Skip to content

Commit

Permalink
Mark preempted jobs as failed
Browse files Browse the repository at this point in the history
  • Loading branch information
severinson committed May 3, 2023
1 parent 531db48 commit 4ed6ba7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/scheduler/scheduling_algo.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ func (l *FairSchedulingAlgo) Schedule(

// Update jobDb.
preemptedJobs := PreemptedJobsFromSchedulerResult[*jobdb.Job](schedulerResult)
preemptedJobs = util.Map(preemptedJobs, func(job *jobdb.Job) *jobdb.Job { return job.WithFailed(true) })
scheduledJobs := ScheduledJobsFromSchedulerResult[*jobdb.Job](schedulerResult)
if err := jobDb.Upsert(txn, preemptedJobs); err != nil {
// TODO: We need to do something here to mark the jobs as preempted in the jobDb.
return nil, err
}
if err := jobDb.Upsert(txn, scheduledJobs); err != nil {
Expand Down

0 comments on commit 4ed6ba7

Please sign in to comment.