Skip to content

Commit 7bae1de

Browse files
committed
RF: Propagate some workflow settings when iterating graph
1 parent 6d23a36 commit 7bae1de

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pydra/engine/core.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,9 @@ async def _run(self, submitter=None, rerun=False, **kwargs):
10551055
"Workflow output cannot be None, use set_output to define output(s)"
10561056
)
10571057
# creating connections that were defined after adding tasks to the wf
1058-
self._connect_and_propagate_to_tasks()
1058+
self._connect_and_propagate_to_tasks(
1059+
propagate_rerun=self.task_rerun and self.propagate_rerun
1060+
)
10591061

10601062
checksum = self.checksum
10611063
output_dir = self.output_dir
@@ -1234,7 +1236,7 @@ def _connect_and_propagate_to_tasks(
12341236
self,
12351237
*,
12361238
propagate_rerun=False,
1237-
override_task_caches=False
1239+
override_task_caches=False,
12381240
):
12391241
"""
12401242
Visit each node in the graph and create the connections.
@@ -1244,11 +1246,11 @@ def _connect_and_propagate_to_tasks(
12441246
self.create_connections(task)
12451247
# if workflow has task_rerun=True and propagate_rerun=True,
12461248
# it should be passed to the tasks
1247-
if self.task_rerun and self.propagate_rerun:
1248-
task.task_rerun = self.task_rerun
1249+
if propagate_rerun:
1250+
task.task_rerun = True
12491251
# if the task is a wf, than the propagate_rerun should be also set
12501252
if is_workflow(task):
1251-
task.propagate_rerun = self.propagate_rerun
1253+
task.propagate_rerun = True
12521254

12531255
# ported from Submitter.__call__
12541256
# TODO: no prepare state ?

0 commit comments

Comments
 (0)