Prevent duplicate completion logs

- Only complete and log cancelled jobs that are still active
- Prevents duplicate completion messages for jobs already handled
- Cleaner logging for job cancellation
parent 75fcfabe
...@@ -1409,8 +1409,9 @@ class ClusterMaster: ...@@ -1409,8 +1409,9 @@ class ClusterMaster:
cancelled_jobs.append(job_id) cancelled_jobs.append(job_id)
for job_id in cancelled_jobs: for job_id in cancelled_jobs:
self.complete_job(job_id) if job_id in self.active_jobs:
print(f"Completed cancelled job {job_id}") self.complete_job(job_id)
print(f"Completed cancelled job {job_id}")
await asyncio.sleep(5) # Poll every 5 seconds await asyncio.sleep(5) # Poll every 5 seconds
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment