@@ -181,7 +181,7 @@ def loadFromCache(self, statusFile):
181181 logging .warning (f"(loadFromCache) { self .nodeName } : Error while loading status file { statusFile } : { e } " )
182182 self .reset ()
183183
184- @property
184+ @property
185185 def nbChunks (self ):
186186 nbBlocks = self .chunks .nbBlocks if self .chunks else - 1
187187 return nbBlocks
@@ -190,15 +190,15 @@ def getChunkRanges(self):
190190 if not self .chunks :
191191 return []
192192 ranges = []
193- for i in range (self .chunks .nbBlocks ):
193+ for i in range (self .chunks .nbBlocks ):
194194 ranges .append (desc .Range (
195- iteration = i ,
196- blockSize = self .chunks .blockSize ,
197- fullSize = self .chunks .fullSize ,
195+ iteration = i ,
196+ blockSize = self .chunks .blockSize ,
197+ fullSize = self .chunks .fullSize ,
198198 nbBlocks = self .chunks .nbBlocks
199199 ))
200200 return ranges
201-
201+
202202 def setChunks (self , chunks ):
203203 blockSize , fullSize , nbBlocks = 1 , 1 , 1
204204 for c in chunks :
@@ -268,7 +268,7 @@ def reset(self):
268268 self .mrNodeType : MrNodeType = MrNodeType .NONE
269269 self .execMode : ExecMode = ExecMode .NONE
270270 self .resetDynamicValues ()
271-
271+
272272 def initStartCompute (self ):
273273 import platform
274274 self .computeSessionUid = meshroom .core .sessionUid
@@ -504,12 +504,14 @@ def logger(self):
504504
505505 def getExecModeName (self ):
506506 return self ._status .execMode .name
507-
507+
508508 def shouldMonitorChanges (self ):
509- """ Check whether we should monitor changes in minimal mode
509+ """
510+ Check whether we should monitor changes in minimal mode.
510511 Only chunks that are run externally or local_isolated should be monitored,
511512 when run locally, status changes are already notified.
512- Chunks with an ERROR status may be re-submitted externally and should thus still be monitored
513+ Chunks with an ERROR status may be re-submitted externally and should thus still be
514+ monitored.
513515 """
514516 return (self .isExtern () and self ._status .status in (Status .SUBMITTED , Status .RUNNING , Status .ERROR )) or \
515517 (self .node .getMrNodeType () == MrNodeType .NODE and self ._status .status in (Status .SUBMITTED , Status .RUNNING ))
@@ -520,7 +522,7 @@ def updateStatusFromCache(self):
520522 """
521523 # TODO : If this is a placeholder chunk
522524 # Then we shouldn't do anything here
523-
525+
524526 statusFile = self .getStatusFile ()
525527 oldStatus = self ._status .status
526528 # No status file => reset status to Status.None
@@ -824,7 +826,7 @@ def __init__(self, nodeType: str, position: Position = None, parent: BaseObject
824826 self ._locked : bool = False
825827 self ._duplicates = ListModel (parent = self ) # list of nodes with the same uid
826828 self ._hasDuplicates : bool = False
827-
829+
828830 self ._nodeStatus : NodeStatusData = NodeStatusData (self ._name , nodeType , self .packageName ,
829831 self .packageVersion , self .getMrNodeType ())
830832 self .nodeStatusFileLastModTime = - 1
@@ -1510,9 +1512,9 @@ def sourceCodeFolder(self):
15101512 @property
15111513 def nodeStatusFile (self ):
15121514 return os .path .join (self .graph .cacheDir , self .internalFolder , "nodeStatus" )
1513-
1515+
15141516 def shouldMonitorChanges (self ):
1515- """ Check whether we should monitor changes in minimal mode
1517+ """ Check whether we should monitor changes in minimal mode.
15161518 Only chunks that are run externally or local_isolated should be monitored,
15171519 when run locally, status changes are already notified.
15181520 Chunks with an ERROR status may be re-submitted externally and should thus still be monitored
@@ -2191,7 +2193,7 @@ def toDict(self):
21912193 }
21922194
21932195 def _resetChunks (self ):
2194- """ Set chunks on the node
2196+ """ Set chunks on the node
21952197 # TODO : Maybe don't delete chunks if we will recreate them as before ?
21962198 """
21972199 if isinstance (self .nodeDesc , desc .InputNode ):
@@ -2230,7 +2232,7 @@ def _resetChunks(self):
22302232 self ._chunksCreated = False
22312233 self .setSize (0 )
22322234 self ._chunks .setObjectList ([])
2233- # Create chunks when possible
2235+ # Create chunks when possible
22342236 self .chunksCreatedChanged .emit ()
22352237 self .chunksChanged .emit ()
22362238 self .globalStatusChanged .emit ()
0 commit comments