@@ -1055,7 +1055,9 @@ async def _run(self, submitter=None, rerun=False, **kwargs):
1055
1055
"Workflow output cannot be None, use set_output to define output(s)"
1056
1056
)
1057
1057
# 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
+ )
1059
1061
1060
1062
checksum = self .checksum
1061
1063
output_dir = self .output_dir
@@ -1234,7 +1236,7 @@ def _connect_and_propagate_to_tasks(
1234
1236
self ,
1235
1237
* ,
1236
1238
propagate_rerun = False ,
1237
- override_task_caches = False
1239
+ override_task_caches = False ,
1238
1240
):
1239
1241
"""
1240
1242
Visit each node in the graph and create the connections.
@@ -1244,11 +1246,11 @@ def _connect_and_propagate_to_tasks(
1244
1246
self .create_connections (task )
1245
1247
# if workflow has task_rerun=True and propagate_rerun=True,
1246
1248
# 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
1249
1251
# if the task is a wf, than the propagate_rerun should be also set
1250
1252
if is_workflow (task ):
1251
- task .propagate_rerun = self . propagate_rerun
1253
+ task .propagate_rerun = True
1252
1254
1253
1255
# ported from Submitter.__call__
1254
1256
# TODO: no prepare state ?
0 commit comments