Skip to content

Commit

Permalink
Avoid duplicate job submissions before reload.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Sep 4, 2024
1 parent 574361b commit 44c00c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes.d/6345.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix duplicate job submissions of tasks in the preparing state before reload.
11 changes: 10 additions & 1 deletion cylc/flow/task_job_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,12 @@ def submit_task_jobs(self, workflow, itasks, curve_auth,
stdin_files = []
job_log_dirs = []
for itask in itasks_batch:
if not itask.waiting_on_job_prep:
# Avoid duplicate job submissions when flushing
# preparing tasks before a reload. See
# https://github.com/cylc/cylc-flow/pull/6345
continue

if remote_mode:
stdin_files.append(
os.path.expandvars(
Expand All @@ -554,8 +560,11 @@ def submit_task_jobs(self, workflow, itasks, curve_auth,
# write flag so that subsequent manual retrigger will
# generate a new job file.
itask.local_job_file_path = None

itask.waiting_on_job_prep = False

if not job_log_dirs:
continue

self.proc_pool.put_command(
SubProcContext(
self.JOBS_SUBMIT,
Expand Down

0 comments on commit 44c00c0

Please sign in to comment.