-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate job submissions on reload #6344
Comments
I also get 3 job submissions with this variant: [scheduler]
[[events]]
startup handlers = "sleep 10; echo" # tie up the restricted process pool for 10 sec
[scheduling]
[[graph]]
R1 = foo
[runtime]
[[foo]] |
Well done on replicating it so fast. Hopefully it is an easy fix. |
Yep, still working on that bit! |
Fix posted. It was easy enough fix inside the subprocess pool code, but I want to see if it should be fixed at a higher level instead. |
Replicated. My trigger-finger isn't as fast as yours, so I jammed in a sleep: diff --git a/cylc/flow/task_state.py b/cylc/flow/task_state.py
index a6a6bc125..3c55f77b4 100644
--- a/cylc/flow/task_state.py
+++ b/cylc/flow/task_state.py
@@ -403,6 +403,10 @@ class TaskState:
Whether state changed or not (bool)
"""
+ if status == 'preparing':
+ from time import sleep
+ sleep(2)
+
req = status
if forced and req in [TASK_STATUS_SUBMITTED, TASK_STATUS_RUNNING]: |
I did it by strapping down the process pool size to 1, then running a 10 sec event handler to keep the next task stuck as preparing while the event handler ran - so no fast trigger finger needed! |
I tried this, but |
I was using my second example above, which only has |
Closed by #6345 |
Original bug report from @sjrennie and @ColemanTom tagged onto the end of a similar-but-different issue:
#6329 (comment)
Reloading the workflow while a task is in the preparing state results in duplicate job submissions. Reproducible test case:
bar
is in thepreparing
state.Result:
The text was updated successfully, but these errors were encountered: