Do not display transformations as finished before the teardown phase has completed.

This commit is contained in:
Romain Dorgueil
2017-05-13 15:25:57 +02:00
parent dd1c49fde0
commit 6b3e5932e8
2 changed files with 6 additions and 4 deletions

View File

@ -81,10 +81,12 @@ class LoopingExecutionContext(Wrapper):
if self._stopped: if self._stopped:
return return
self._stopped = True try:
with unrecoverable(self.handle_error):
self._stack.teardown()
finally:
self._stopped = True
with unrecoverable(self.handle_error):
self._stack.teardown()
def handle_error(self, exc, trace): def handle_error(self, exc, trace):
return print_error(exc, trace, context=self.wrapped) return print_error(exc, trace, context=self.wrapped)

View File

@ -22,7 +22,7 @@ class NodeExecutionContext(WithStatistics, LoopingExecutionContext):
@property @property
def alive(self): def alive(self):
"""todo check if this is right, and where it is used""" """todo check if this is right, and where it is used"""
return self.input.alive and self._started and not self._stopped return self._started and not self._stopped
@property @property
def alive_str(self): def alive_str(self):