diff --git a/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ComputeService.java b/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ComputeService.java index b6a69209f..c7478c841 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ComputeService.java +++ b/opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ComputeService.java @@ -463,10 +463,13 @@ private void doSchedule() { // Remove the incoming image taskQueue.poll(); tasksPending--; + tasksTerminated++; LOGGER.warn("Failed to spawn {}: does not fit", task); - task.setState(TaskState.FAILED); + task.setState(TaskState.TERMINATED); + + this.setTaskToBeRemoved(task); continue; } else { break;