mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-10 07:36:52 +02:00
[core] Node: stopComputation method
- Node: stopComputation method. - Task Manager: avoid stopping the entire task manager when a node is stopped.
This commit is contained in:
parent
723e007ae6
commit
b71832ebbd
2 changed files with 7 additions and 3 deletions
|
@ -788,6 +788,12 @@ class BaseNode(BaseObject):
|
|||
def endSequence(self):
|
||||
pass
|
||||
|
||||
def stopComputation(self):
|
||||
""" Stop the computation of this node. """
|
||||
for chunk in self._chunks.values():
|
||||
if not chunk.isExtern():
|
||||
chunk.stopProcess()
|
||||
|
||||
def getGlobalStatus(self):
|
||||
"""
|
||||
Get node global status based on the status of its chunks.
|
||||
|
|
|
@ -56,9 +56,7 @@ class TaskThread(Thread):
|
|||
chunk.process(self.forceCompute)
|
||||
except Exception as e:
|
||||
if chunk.isStopped():
|
||||
self._state = State.STOPPED
|
||||
self._manager._graph.clearSubmittedNodes()
|
||||
self._manager._nodesToProcess = []
|
||||
pass
|
||||
else:
|
||||
logging.error("Error on node computation: {}".format(e))
|
||||
nodesToRemove, _ = self._manager._graph.nodesFromNode(node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue