Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
severinson committed Nov 20, 2023
1 parent adb9eb4 commit a774dc0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/scheduler/simulator/simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,9 @@ func (s *Simulator) handleJobRunLeased(txn *jobdb.Txn, e *armadaevents.JobRunLea
)

updatedJob := job.WithUpdatedRun(job.LatestRun().WithRunning(true))
txn.Upsert([]*jobdb.Job{updatedJob})
if err := txn.Upsert([]*jobdb.Job{updatedJob}); err != nil {
return nil, false, err
}
return updatedJob, true, nil
}

Expand Down Expand Up @@ -817,7 +819,9 @@ func (s *Simulator) handleJobRunPreempted(txn *jobdb.Txn, e *armadaevents.JobRun
)
s.jobTemplateByJobId[retryJobId.String()] = jobTemplate
updatedJob := job.WithUpdatedRun(job.LatestRun().WithReturned(true))
txn.Upsert([]*jobdb.Job{updatedJob})
if err := txn.Upsert([]*jobdb.Job{updatedJob}); err != nil {
return nil, false, err
}
return updatedJob, true, nil
}

Expand Down

0 comments on commit a774dc0

Please sign in to comment.