1
0
Fork 0

fix(api): only remove running jobs from running state

This commit is contained in:
Sean Sube 2023-03-18 19:21:40 -05:00
parent 716e009611
commit 2e89fd43d3
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 3 additions and 1 deletions

View File

@ -413,7 +413,9 @@ class DevicePoolExecutor:
# move from running to finished # move from running to finished
logger.info("job has finished: %s", progress.job) logger.info("job has finished: %s", progress.job)
self.finished_jobs.append(progress) 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() self.join_leaking()
if progress.job in self.cancelled_jobs: if progress.job in self.cancelled_jobs:
self.cancelled_jobs.remove(progress.job) self.cancelled_jobs.remove(progress.job)