Remove old job cleanup

- Don't remove jobs based on age since jobs can run for hours
- Leftover jobs from previous runs will be handled by restart cleanup
- Prevents interrupting long-running legitimate jobs
parent ebcbfda5
......@@ -1400,16 +1400,6 @@ class ClusterMaster:
print(f"No suitable worker found for job {job['id']}, re-queuing")
update_queue_status(job['id'], 'queued', error='No suitable worker found, re-queued')
# Clean up old active jobs (older than 10 minutes)
current_time = time.time()
to_remove = []
for job_id, job_info in self.active_jobs.items():
if current_time - job_info['start_time'] > 600: # 10 minutes
to_remove.append(job_id)
for job_id in to_remove:
self.complete_job(job_id)
print(f"Cleaned up old active job {job_id}")
# Check for cancelled jobs that need to be stopped
cancelled_jobs = []
for job_id, job_info in self.active_jobs.items():
......
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