Support pausing jobs #104313

Manually merged
Sybren A. Stüvel merged 28 commits from David-Zhang-10/flamenco:paused-job-status into main 2024-07-01 17:53:44 +02:00
Showing only changes of commit a569a1ce00 - Show all commits

View File

@ -486,10 +486,9 @@ func (sm *StateMachine) pauseTasks(
logger.Info().Msg("pausing tasks of job")
// Any task that might run in the future should get paused.
// Active jobs should remain active until finished
// Active tasks should remain active until finished.
taskStatusesToPause := []api.TaskStatus{
api.TaskStatusQueued,
api.TaskStatusCanceled,
api.TaskStatusSoftFailed,
}
err := sm.persist.UpdateJobsTaskStatusesConditional(