summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-api/src/main/kotlin
diff options
context:
space:
mode:
authorDante Niewenhuis <d.niewenhuis@hotmail.com>2024-09-12 15:32:47 +0200
committerGitHub <noreply@github.com>2024-09-12 15:32:47 +0200
commit5047e4a25a0814f96852882f02c4017e1d5f81e7 (patch)
tree348f064fd8e03a2a64fc5b30406e992586b4aac0 /opendc-compute/opendc-compute-api/src/main/kotlin
parentad8051faa1f0a6e7f78384e9e0607e847848c033 (diff)
Added max number of failures (#254)
* Added a max failure for tasks. If tasks fail more times, they get cancelled * Added maxNumFailures to the frontend * Updated tests
Diffstat (limited to 'opendc-compute/opendc-compute-api/src/main/kotlin')
-rw-r--r--opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Task.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Task.kt b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Task.kt
index c9b0aeb3..23f2cb91 100644
--- a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Task.kt
+++ b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Task.kt
@@ -44,6 +44,11 @@ public interface Task : Resource {
public val state: TaskState
/**
+ * The number of times a Task has been stopped due to failures
+ */
+ public val numFailures: Int
+
+ /**
* The most recent moment in time when the task was launched.
*/
public val launchedAt: Instant?