mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-10 15:46:54 +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):
|
def endSequence(self):
|
||||||
pass
|
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):
|
def getGlobalStatus(self):
|
||||||
"""
|
"""
|
||||||
Get node global status based on the status of its chunks.
|
Get node global status based on the status of its chunks.
|
||||||
|
|
|
@ -56,9 +56,7 @@ class TaskThread(Thread):
|
||||||
chunk.process(self.forceCompute)
|
chunk.process(self.forceCompute)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if chunk.isStopped():
|
if chunk.isStopped():
|
||||||
self._state = State.STOPPED
|
pass
|
||||||
self._manager._graph.clearSubmittedNodes()
|
|
||||||
self._manager._nodesToProcess = []
|
|
||||||
else:
|
else:
|
||||||
logging.error("Error on node computation: {}".format(e))
|
logging.error("Error on node computation: {}".format(e))
|
||||||
nodesToRemove, _ = self._manager._graph.nodesFromNode(node)
|
nodesToRemove, _ = self._manager._graph.nodesFromNode(node)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue