Skip to content

Commit c9959ac

Browse files
committed
fix: ensure updates of self.task are performed when self.allow_pick_jobs is set to False. close #369
1 parent 0a5d47a commit c9959ac

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arq/worker.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,14 @@ async def _poll_iteration(self) -> None:
382382

383383
await self.start_jobs(job_ids)
384384

385-
if self.allow_abort_jobs:
386-
await self._cancel_aborted_jobs()
387-
388-
for job_id, t in list(self.tasks.items()):
389-
if t.done():
390-
del self.tasks[job_id]
391-
# required to make sure errors in run_job get propagated
392-
t.result()
385+
if self.allow_abort_jobs:
386+
await self._cancel_aborted_jobs()
387+
388+
for job_id, t in list(self.tasks.items()):
389+
if t.done():
390+
del self.tasks[job_id]
391+
# required to make sure errors in run_job get propagated
392+
t.result()
393393

394394
await self.heart_beat()
395395

0 commit comments

Comments
 (0)