Skip to content

Commit f51bf18

Browse files
committed
[core] Only update the running chunk to STOPPED when stopping computations
Chunks of that node that are already in the `SUCCESS` state will not be updated, and those that are `SUBMITTED` but not `RUNNING` will be reset to `NONE`.
1 parent bb9195f commit f51bf18

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

meshroom/core/node.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,11 @@ def process(self, forceCompute=False):
429429
self.upgradeStatusTo(Status.SUCCESS)
430430

431431
def stopProcess(self):
432-
self.upgradeStatusTo(Status.STOPPED)
432+
if not self.isExtern():
433+
if self._status.status == Status.RUNNING:
434+
self.upgradeStatusTo(Status.STOPPED)
435+
elif self._status.status == Status.SUBMITTED:
436+
self.upgradeStatusTo(Status.NONE)
433437
self.node.nodeDesc.stopProcess(self)
434438

435439
def isExtern(self):
@@ -942,8 +946,7 @@ def endSequence(self):
942946
def stopComputation(self):
943947
""" Stop the computation of this node. """
944948
for chunk in self._chunks.values():
945-
if not chunk.isExtern():
946-
chunk.stopProcess()
949+
chunk.stopProcess()
947950

948951
def getGlobalStatus(self):
949952
"""

0 commit comments

Comments
 (0)