From b20dd5ebb48465470b9632dc92ecfb1794a8a4bf Mon Sep 17 00:00:00 2001 From: Sacheendra Talluri Date: Thu, 27 Mar 2025 16:14:39 +0100 Subject: Support carbon forecasting in timeshift (#327) * Remove task from scheduler bookkeeping after failure * Support carbon forecasting in timeshift * Register scheduler and carbonmodel in context * Preliminary working task stopping; carbon intensity bug * Working carbon based stop. Two timeshift thresholds * Add a pause state task and guest * Move task stopper to allocation spec * Start tracking num pauses --- .../src/main/kotlin/org/opendc/compute/api/TaskState.kt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'opendc-compute/opendc-compute-api/src/main') diff --git a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/TaskState.kt b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/TaskState.kt index f3f2ca6f..19ef963e 100644 --- a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/TaskState.kt +++ b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/TaskState.kt @@ -42,6 +42,11 @@ public enum class TaskState { */ RUNNING, + /** + * The task was running but was stopped, maybe by the taskSTopper + */ + PAUSED, + /** * The task is in a failed state. */ -- cgit v1.2.3