Support pausing jobs #104313
@ -5,6 +5,7 @@ package task_state_machine
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"projects.blender.org/studio/flamenco/pkg/website"
|
||||||
|
|
||||||
David-Zhang-10 marked this conversation as resolved
Outdated
|
|||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
@ -471,9 +472,9 @@ func (sm *StateMachine) pauseTasks(
|
|||||||
return api.JobStatusPaused, nil
|
return api.JobStatusPaused, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// This could mean pause was triggered by failure of the job, in which case the
|
// This could mean state transition entered a non-recoverable error state.
|
||||||
// job is already in the correct status.
|
log.Warn().Str("jobStatus", string(job.Status)).Msgf("unexpected job status in StateMachine::pauseTasks(), please report this at %s", website.BugReportURL)
|
||||||
return "", nil
|
return "", fmt.Errorf("unexpected job status %q in StateMachine::pauseTasks()", job.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
// requeueTasks re-queues all tasks of the job.
|
// requeueTasks re-queues all tasks of the job.
|
||||||
|
Loading…
Reference in New Issue
Block a user
Keep the newline between built-in packages and 3rd party packages.