Skip to content

Commit 7ceb4de

Browse files
authored
Merge pull request #214 from djarecka/mnt/state_review
Mnt/state review
2 parents feafec8 + d8a0320 commit 7ceb4de

File tree

7 files changed

+748
-501
lines changed

7 files changed

+748
-501
lines changed

pydra/engine/core.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -776,20 +776,21 @@ def create_connections(self, task):
776776
)
777777
# if task has connections state has to be recalculated
778778
if other_states:
779+
if hasattr(task, "fut_combiner"):
780+
combiner = task.fut_combiner
781+
else:
782+
combiner = None
783+
779784
if task.state:
780-
old_splitter = task.state.splitter
785+
task.state.update_connections(
786+
new_other_states=other_states, new_combiner=combiner
787+
)
781788
else:
782-
old_splitter = None
783-
if hasattr(task, "fut_combiner"):
784789
task.state = state.State(
785790
task.name,
786-
splitter=old_splitter,
791+
splitter=None,
787792
other_states=other_states,
788-
combiner=task.fut_combiner,
789-
)
790-
else:
791-
task.state = state.State(
792-
task.name, splitter=old_splitter, other_states=other_states
793+
combiner=combiner,
793794
)
794795

795796
async def _run(self, submitter=None, rerun=False, **kwargs):

0 commit comments

Comments
 (0)