Skip to content

Commit 801f8e6

Browse files
committed
refact(sol): facilitate sub-classing with sol._update_out()
1 parent d8687b2 commit 801f8e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

graphtik/execution.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ def _reschedule(self, dag, nbunch_to_break, op):
143143
op.name,
144144
)
145145

146+
def _update_op_outs(self, op, outputs):
147+
"""A separate method to allow subclasses with custom (e.g. nested) logic. """
148+
self._layers[op].update(outputs)
149+
146150
def operation_executed(self, op, outputs):
147151
"""
148152
Invoked once per operation, with its results.
@@ -165,7 +169,7 @@ def collect_canceled_sideffects(dep, val) -> Collection:
165169
return ()
166170
return dep_singularized(dep)
167171

168-
self._layers[op].update(outputs)
172+
self._update_op_outs(op, outputs)
169173
self.executed[op] = None
170174

171175
if first_solid(self.is_reschedule, op.rescheduled):

0 commit comments

Comments
 (0)