Skip to content

Commit d215f22

Browse files
authored
Replace del with pop for job_tasks dictionary
1 parent fda407c commit d215f22

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arq/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ async def job_failed(exc: BaseException) -> None:
601601
else:
602602
result_str = '' if result is None or not self.log_results else truncate(repr(result))
603603
finally:
604-
del self.job_tasks[job_id]
604+
self.job_tasks.pop(job_id, None)
605605

606606
except (Exception, asyncio.CancelledError) as e:
607607
finished_ms = timestamp_ms()

0 commit comments

Comments
 (0)