From 828fa0c1b0791c540ba6a329941bb11226bd6d0b Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Fri, 14 Apr 2023 11:41:42 +0200 Subject: [PATCH] need to remove non bot jobs earlier + using current jobs for processing running jobs --- eessi_bot_job_manager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eessi_bot_job_manager.py b/eessi_bot_job_manager.py index a9126c21..aa54f3a0 100644 --- a/eessi_bot_job_manager.py +++ b/eessi_bot_job_manager.py @@ -676,6 +676,10 @@ def main(): # " %s due to parameter '--jobs %s'" % ( # nj,opts.jobs), job_manager.logfile) + # remove non bot jobs from current_jobs + for job in non_bot_jobs: + current_jobs.pop(job) + running_jobs = job_manager.determine_running_jobs(current_jobs) log( "job manager main loop: running_jobs='%s'" % @@ -685,7 +689,7 @@ def main(): for rj in running_jobs: if not job_manager.job_filter or rj in job_manager.job_filter: - job_manager.process_running_jobs(known_jobs[rj]) + job_manager.process_running_jobs(current_jobs[rj]) finished_jobs = job_manager.determine_finished_jobs( known_jobs, current_jobs) @@ -703,10 +707,6 @@ def main(): # "job %s due"" to parameter '--jobs %s'" % (fj,opts.jobs), # " job_manager.logfile)" - # remove non bot jobs from current_jobs - for job in non_bot_jobs: - current_jobs.pop(job) - known_jobs = current_jobs # sleep poll_interval seconds (only if at least one more iteration)