@@ -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 :
@@ -215,7 +215,7 @@ class ChunkStatusData(BaseObject):
215215
216216 __slots__ = (
217217 "nodeName" , "nodeType" , "packageName" , "packageVersion" , "mrNodeType" ,
218- "computeSessionUid" , "execMode" , "status" , "graph" , "commandLine" , "env" ,
218+ "computeSessionUid" , "execMode" , "status" , "graph" , "commandLine" , "env" ,
219219 "startDateTime" , "endDateTime" , "elapsedTime" , "hostname"
220220 )
221221
@@ -274,7 +274,7 @@ def reset(self):
274274 self .mrNodeType : MrNodeType = MrNodeType .NONE
275275 self .execMode : ExecMode = ExecMode .NONE
276276 self .resetDynamicValues ()
277-
277+
278278 def initStartCompute (self ):
279279 import platform
280280 self .computeSessionUid = meshroom .core .sessionUid
@@ -510,12 +510,14 @@ def logger(self):
510510
511511 def getExecModeName (self ):
512512 return self ._status .execMode .name
513-
513+
514514 def shouldMonitorChanges (self ):
515- """ Check whether we should monitor changes in minimal mode
515+ """
516+ Check whether we should monitor changes in minimal mode.
516517 Only chunks that are run externally or local_isolated should be monitored,
517518 when run locally, status changes are already notified.
518- Chunks with an ERROR status may be re-submitted externally and should thus still be monitored
519+ Chunks with an ERROR status may be re-submitted externally and should thus still be
520+ monitored.
519521 """
520522 return (self .isExtern () and self ._status .status in (Status .SUBMITTED , Status .RUNNING , Status .ERROR )) or \
521523 (self .node .getMrNodeType () == MrNodeType .NODE and self ._status .status in (Status .SUBMITTED , Status .RUNNING ))
@@ -526,7 +528,7 @@ def updateStatusFromCache(self):
526528 """
527529 # TODO : If this is a placeholder chunk
528530 # Then we shouldn't do anything here
529-
531+
530532 statusFile = self .getStatusFile ()
531533 oldStatus = self ._status .status
532534 # No status file => reset status to Status.None
@@ -831,7 +833,7 @@ def __init__(self, nodeType: str, position: Position = None, parent: BaseObject
831833 self ._locked : bool = False
832834 self ._duplicates = ListModel (parent = self ) # list of nodes with the same uid
833835 self ._hasDuplicates : bool = False
834-
836+
835837 self ._nodeStatus : NodeStatusData = NodeStatusData (self ._name , nodeType , self .packageName ,
836838 self .packageVersion , self .getMrNodeType ())
837839 self .nodeStatusFileLastModTime = - 1
@@ -1521,9 +1523,9 @@ def sourceCodeFolder(self):
15211523 @property
15221524 def nodeStatusFile (self ):
15231525 return os .path .join (self .graph .cacheDir , self .internalFolder , "nodeStatus" )
1524-
1526+
15251527 def shouldMonitorChanges (self ):
1526- """ Check whether we should monitor changes in minimal mode
1528+ """ Check whether we should monitor changes in minimal mode.
15271529 Only chunks that are run externally or local_isolated should be monitored,
15281530 when run locally, status changes are already notified.
15291531 Chunks with an ERROR status may be re-submitted externally and should thus still be monitored
@@ -2203,7 +2205,7 @@ def toDict(self):
22032205 }
22042206
22052207 def _resetChunks (self ):
2206- """ Set chunks on the node
2208+ """ Set chunks on the node
22072209 # TODO : Maybe don't delete chunks if we will recreate them as before ?
22082210 """
22092211 if isinstance (self .nodeDesc , desc .InputNode ):
@@ -2242,7 +2244,7 @@ def _resetChunks(self):
22422244 self ._chunksCreated = False
22432245 self .setSize (0 )
22442246 self ._chunks .setObjectList ([])
2245- # Create chunks when possible
2247+ # Create chunks when possible
22462248 self .chunksCreatedChanged .emit ()
22472249 self .chunksChanged .emit ()
22482250 self .globalStatusChanged .emit ()
0 commit comments