Skip to content

Commit

Permalink
Fix: need copy of graph_children.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed May 11, 2023
1 parent a608b22 commit 2fce61c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1221,27 +1221,26 @@ def spawn_on_output(self, itask, output, forced=False):
if forced:
self.tasks_to_spawn_forced[
(itask, output)
] = itask.graph_children[output]
] = list(itask.graph_children[output])
else:
self.tasks_to_spawn[
(itask, output)
] = itask.graph_children[output]
] = list(itask.graph_children[output])
except KeyError:
# No children depend on this output
pass
else:
self.spawn_children()

# Remove after spawning, to avoid briefly emptying the task pool
# in simple cases (foo[-P1] => foo) - which can lead to shutdown.
# Remove after spawning, to avoid briefly emptying the task pool
# in simple cases (foo[-P1] => foo) - which can lead to shutdown.
if not forced and output in [
TASK_OUTPUT_SUCCEEDED,
TASK_OUTPUT_EXPIRED,
TASK_OUTPUT_FAILED
]:
self.remove_if_complete(itask)


def spawn_children(self):
self._spawn_children(self.tasks_to_spawn)
self._spawn_children(self.tasks_to_spawn_forced, forced=True)
Expand Down Expand Up @@ -1305,8 +1304,7 @@ def _spawn_children(self, children, forced=False):
(str(itask.point), itask.tdef.name, output)
})
self.data_store_mgr.delta_task_prerequisite(t)
# Add it to the hidden pool or move it to the main
# pool.
# Add it to hidden pool or move it to main pool.
self.add_to_pool(t)

if t.point <= self.runahead_limit_point:
Expand Down

0 comments on commit 2fce61c

Please sign in to comment.