From c17caa862041033bdba721a146143b8ff16c3d16 Mon Sep 17 00:00:00 2001 From: redpinecube Date: Sun, 5 Oct 2025 17:36:52 -0500 Subject: [PATCH] added job states Signed-off-by: redpinecube --- src/util.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/util.go b/src/util.go index f6ee922..2f5207e 100644 --- a/src/util.go +++ b/src/util.go @@ -14,6 +14,16 @@ const ( RetryDelay = 5 * time.Second ) +type JobState string + +const ( + JobStateScheduled JobState = "Scheduled" + JobStateInProgress JobState = "InProgress" + JobStateSuccess JobState = "Success" + JobStateError JobState = "Error" + JobStateFailure JobState = "Failure" +) + type Job struct { ID string `json:"id"` Type string `json:"type"` @@ -21,6 +31,7 @@ type Job struct { Retries int `json:"retries"` Created time.Time `json:"created"` RequiredGPU string `json:"gpu"` + JobState JobState `json:"job_state"` } type SupervisorState string