Add job cancellation handling and periodic cleanup logic
Introduce new statuses, "to_cancel" and "cancelled", to improve job state tracking. Implement logic to nullify `slurm_id` for cancelled jobs and a background thread to clean up cancelled jobs older than 2 hours. Ensure periodic cleanup runs hourly to maintain database hygiene.
This commit is contained in:
@ -313,6 +313,8 @@ class JobStatus(str, enum.Enum):
|
||||
TODO = "todo"
|
||||
SUBMITTED = "submitted"
|
||||
DONE = "done"
|
||||
TO_CANCEL = "to_cancel"
|
||||
CANCELLED = "cancelled"
|
||||
FAILED = "failed"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user