[core] Computing and submitting take nonComputing into account + Comment

When computing or submitting a graph, if nodes are not computable they do not send warning that nodes had trouble.
This commit is contained in:
Aurore LAFAURIE 2024-04-11 12:16:22 +02:00 committed by Fabien Castan
parent 671b3ff128
commit 3a199d7973
2 changed files with 6 additions and 3 deletions

View file

@ -50,7 +50,7 @@ class Status(Enum):
STOPPED = 4 STOPPED = 4
KILLED = 5 KILLED = 5
SUCCESS = 6 SUCCESS = 6
INPUT = 7 INPUT = 7 # special status for input nodes
class ExecMode(Enum): class ExecMode(Enum):

View file

@ -333,8 +333,11 @@ class TaskManager(BaseObject):
""" """
ready = [] ready = []
computed = [] computed = []
inputNodes = []
for node in toNodes: for node in toNodes:
if context == "COMPUTATION": if not node.isComputable:
inputNodes.append(node)
elif context == "COMPUTATION":
if graph.canCompute(node) and graph.canSubmitOrCompute(node) % 2 == 1: if graph.canCompute(node) and graph.canSubmitOrCompute(node) % 2 == 1:
ready.append(node) ready.append(node)
elif node.isComputed: elif node.isComputed:
@ -347,7 +350,7 @@ class TaskManager(BaseObject):
else: else:
raise ValueError("Argument 'context' must be: 'COMPUTATION' or 'SUBMITTING'") raise ValueError("Argument 'context' must be: 'COMPUTATION' or 'SUBMITTING'")
if len(ready) + len(computed) != len(toNodes): if len(ready) + len(computed) + len(inputNodes) != len(toNodes):
toNodes.clear() toNodes.clear()
toNodes.extend(ready) toNodes.extend(ready)
return False return False