@@ -435,7 +435,6 @@ def updateChunks(self):
435435 if node ._chunksCreated :
436436 nodechunks = node .getChunks ()
437437 chunks .extend (nodechunks )
438- else :
439438 if self ._sortedDFSChunks .objectList () == chunks :
440439 # Nothing has changed, return
441440 return
@@ -624,6 +623,7 @@ def stopTask(self, chunk: NodeChunk):
624623 else :
625624 chunk .updateStatusFromCache ()
626625 chunk .upgradeStatusTo (Status .STOPPED )
626+ # TODO : Stop depending nodes ?
627627 self .parent ().showMessage (f"Stopped chunk { chunkIteration } of { node .label } " )
628628 else :
629629 chunk .stopProcess ()
@@ -649,6 +649,7 @@ def stopNode(self, node: Node):
649649 else :
650650 node .updateNodeStatusFromCache ()
651651 node .upgradeStatusTo (Status .STOPPED )
652+ # TODO : Stop depending nodes ?
652653 self .parent ().showMessage (f"Stopped node { node .label } " )
653654 else :
654655 self .cancelNodeComputation (node )
@@ -686,7 +687,6 @@ def skipTask(self, chunk: NodeChunk):
686687 In local mode, the chunk status will be set to success
687688 """
688689 chunk .updateStatusFromCache ()
689- chunk .upgradeStatusTo (Status .NONE )
690690 node = chunk .node
691691 chunkIteration = chunk .range .iteration
692692 job = jobManager .getNodeJob (node )
@@ -697,6 +697,7 @@ def skipTask(self, chunk: NodeChunk):
697697 self .parent ().showMessage (f"Failed to skip chunk { chunkIteration } of { node .label } " , "error" )
698698 logging .warning (f"Error on skipTask :\n { e } " )
699699 else :
700+ chunk .upgradeStatusTo (Status .SUCCESS )
700701 self .parent ().showMessage (f"Skipped chunk { chunkIteration } of { node .label } " )
701702 else :
702703 chunk .stopProcess ()
@@ -765,7 +766,8 @@ def interruptJob(self, node: Node):
765766 for chunk in self ._sortedDFSChunks :
766767 if jobManager .getNodeJob (chunk .node ) == job :
767768 chunk .updateStatusFromCache ()
768- chunk .upgradeStatusTo (Status .SUBMITTED )
769+ chunk .upgradeStatusTo (Status .STOPPED )
770+ # TODO : Also nodes without chunks ?
769771 self .parent ().showMessage (f"Interrupted the job for node { node } " )
770772 else :
771773 self ._taskManager .clear ()
@@ -782,7 +784,15 @@ def restartJobErrorTasks(self, node: Node):
782784 job = jobManager .getNodeJob (node )
783785 if job :
784786 try :
787+ # Fist update status of each chunk to submitted
788+ for chunk in self ._sortedDFSChunks :
789+ if chunk ._status .status not in (Status .ERROR , Status .STOPPED , Status .KILLED ):
790+ continue
791+ if jobManager .getNodeJob (chunk .node ) == job :
792+ chunk .upgradeStatusTo (Status .SUBMITTED )
793+ # TODO : Also nodes without chunks ?
785794 job .restartErrorTasks ()
795+ job .resumeJob ()
786796 except Exception as e :
787797 self .parent ().showMessage (f"Failed to restart error tasks for node { node .label } on farm" , "error" )
788798 logging .warning (f"Error on restartJobErrorTasks :\n { e } " )
0 commit comments