Manager: at startup check for stuck pause-requested
jobs
When the Manager starts up, it now also checks whether `pause-requested` jobs can actually go to `paused`.
This commit is contained in:
parent
ff29d2ef26
commit
d10bb0a9d7
@ -10,7 +10,7 @@ bugs in actually-released versions.
|
|||||||
- The conversion from a known path prefix to a variable is now done in a case-insensitive way. This means that if the variable `{storage}` has value `S:\Flamenco`, a path `s:\flamenco\project\file.blend` will be recognised and stored as `{storage}\project\file.blend`.
|
- The conversion from a known path prefix to a variable is now done in a case-insensitive way. This means that if the variable `{storage}` has value `S:\Flamenco`, a path `s:\flamenco\project\file.blend` will be recognised and stored as `{storage}\project\file.blend`.
|
||||||
|
|
||||||
This happens uniformly, regardless of the platform. So also on Linux, which has a case-sensitive filesystem, this matching is done in a case-insensitive way. It is very unlikely that a Flamenco configuration has two separate variables, for paths that only differ in their case.
|
This happens uniformly, regardless of the platform. So also on Linux, which has a case-sensitive filesystem, this matching is done in a case-insensitive way. It is very unlikely that a Flamenco configuration has two separate variables, for paths that only differ in their case.
|
||||||
- Fix issue where jobs could get stuck in `pause-requested` state.
|
- Fix issue where jobs could get stuck in `pause-requested` state. Such jobs are now also detected at startup of the Manager, and sent to `paused` when possible.
|
||||||
|
|
||||||
|
|
||||||
## 3.6 - released 2024-12-01
|
## 3.6 - released 2024-12-01
|
||||||
|
@ -662,7 +662,11 @@ func (sm *StateMachine) CheckStuck(ctx context.Context) {
|
|||||||
sm.mutex.Lock()
|
sm.mutex.Lock()
|
||||||
defer sm.mutex.Unlock()
|
defer sm.mutex.Unlock()
|
||||||
|
|
||||||
stuckJobs, err := sm.persist.FetchJobsInStatus(ctx, api.JobStatusCancelRequested, api.JobStatusRequeueing)
|
stuckJobs, err := sm.persist.FetchJobsInStatus(ctx,
|
||||||
|
api.JobStatusCancelRequested,
|
||||||
|
api.JobStatusRequeueing,
|
||||||
|
api.JobStatusPauseRequested,
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msg("unable to fetch stuck jobs")
|
log.Error().Err(err).Msg("unable to fetch stuck jobs")
|
||||||
return
|
return
|
||||||
|
@ -447,7 +447,11 @@ func TestCheckStuck(t *testing.T) {
|
|||||||
// task3 := taskOfSameJob(task2, api.TaskStatusSoftFailed)
|
// task3 := taskOfSameJob(task2, api.TaskStatusSoftFailed)
|
||||||
job.Status = api.JobStatusRequeueing
|
job.Status = api.JobStatusRequeueing
|
||||||
|
|
||||||
mocks.persist.EXPECT().FetchJobsInStatus(ctx, api.JobStatusCancelRequested, api.JobStatusRequeueing).
|
mocks.persist.EXPECT().FetchJobsInStatus(ctx,
|
||||||
|
api.JobStatusCancelRequested,
|
||||||
|
api.JobStatusRequeueing,
|
||||||
|
api.JobStatusPauseRequested,
|
||||||
|
).
|
||||||
Return([]*persistence.Job{job}, nil)
|
Return([]*persistence.Job{job}, nil)
|
||||||
mocks.persist.EXPECT().CountTasksOfJobInStatus(ctx, job, api.TaskStatusCompleted).Return(1, 3, nil)
|
mocks.persist.EXPECT().CountTasksOfJobInStatus(ctx, job, api.TaskStatusCompleted).Return(1, 3, nil)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user