Skip to content

Commit

Permalink
Job runner typo did not cancel revoked jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
glormph committed Nov 18, 2024
1 parent 23966fb commit 687d629
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/jobs/management/commands/runjobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def run_ready_jobs(job_fn_map, job_ds_map, active_jobs):
elif job.state == Jobstates.REVOKING:
# canceling job from revoke status only happens here
# we do a new query update where state=revoking, as to not get race with someone quickly un-revoking
canceled = Job.objects.filter(pk=job.pk, state__in=jj.Jobstates.REVOKING).update(state=jj.Jobstates.CANCELED)
canceled = Job.objects.filter(pk=job.pk, state=jj.Jobstates.REVOKING).update(state=jj.Jobstates.CANCELED)
# There is an extra check if the job actually has revokable tasks
# Most jobs are not, but very long running user-ordered tasks are.
if jwrapper.revokable and canceled:
Expand Down

0 comments on commit 687d629

Please sign in to comment.