Skip to content

Commit

Permalink
fix(api): only remove running jobs from running state
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Mar 19, 2023
1 parent 716e009 commit 2e89fd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/onnx_web/worker/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ def update_job(self, progress: ProgressCommand):
# move from running to finished
logger.info("job has finished: %s", progress.job)
self.finished_jobs.append(progress)
del self.running_jobs[progress.job]
if progress.job in self.running_jobs:
del self.running_jobs[progress.job]

self.join_leaking()
if progress.job in self.cancelled_jobs:
self.cancelled_jobs.remove(progress.job)
Expand Down

0 comments on commit 2e89fd4

Please sign in to comment.