Merge pull request #2258 from alicevision/fix/stopLocalComputations

[core] Only update the running chunk to `STOPPED` when stopping computations
This commit is contained in:
Fabien Castan 2023-11-24 16:56:04 +00:00 committed by GitHub
commit 360efb36ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -429,7 +429,11 @@ class NodeChunk(BaseObject):
self.upgradeStatusTo(Status.SUCCESS)
def stopProcess(self):
self.upgradeStatusTo(Status.STOPPED)
if not self.isExtern():
if self._status.status == Status.RUNNING:
self.upgradeStatusTo(Status.STOPPED)
elif self._status.status == Status.SUBMITTED:
self.upgradeStatusTo(Status.NONE)
self.node.nodeDesc.stopProcess(self)
def isExtern(self):
@ -942,8 +946,7 @@ class BaseNode(BaseObject):
def stopComputation(self):
""" Stop the computation of this node. """
for chunk in self._chunks.values():
if not chunk.isExtern():
chunk.stopProcess()
chunk.stopProcess()
def getGlobalStatus(self):
"""