Added stopsignal module with checkDependency and addStopSignal definitions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from core.apirequest import executeRequest
|
||||
from core.runtime.runtimecontract import buildRuntimeAttr, buildPreRuntimeAttr
|
||||
from core.runtime.stopsignals import addStopSignal
|
||||
|
||||
|
||||
def buildAction (action, outputs):
|
||||
@@ -11,8 +12,6 @@ def buildAction (action, outputs):
|
||||
return outputs, None
|
||||
|
||||
if match:
|
||||
if hasattr(action, "depends"):
|
||||
outputs["stopsignals"].append(action.alias)
|
||||
return outputs, None
|
||||
|
||||
response, outputs = executeRequest(action, outputs, resolved)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import logging
|
||||
from core.runtime.managefailure import manageFailure
|
||||
from core.execution.action.action import buildAction
|
||||
from core.runtime.stopsignals import checkDependency
|
||||
#from core.runtime.skipstep import skipStep
|
||||
#from core.runtime.recursive import recursiveSet
|
||||
|
||||
@@ -11,19 +12,13 @@ def buildOperation(definition, outputs):
|
||||
responses = []
|
||||
outputs["stopsignals"] = []
|
||||
for action in actions:
|
||||
if hasattr(action, "depends"):
|
||||
stop =any(
|
||||
dependency in outputs["stopsignals"]
|
||||
for dependency in action.depends
|
||||
)
|
||||
stop = checkDependency(action, outputs)
|
||||
|
||||
#print(f"STOP SIGNAL DEBUGGING during {action.name}")
|
||||
#print(outputs["stopsignals"])
|
||||
#stop = True
|
||||
#break
|
||||
#print(f"STOP SIGNAL DEBUGGING during {action.name}")
|
||||
#print(outputs["stopsignals"])
|
||||
|
||||
if stop:
|
||||
continue
|
||||
if stop:
|
||||
continue
|
||||
|
||||
outputs, response = executeContract(action, outputs)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ from core.execution import action
|
||||
from core.execution.action.action import buildAction
|
||||
from core.runtime.runtimecontract import buildPreRuntimeAttr, buildRuntimeAttr
|
||||
from core.apirequest import executeRequest
|
||||
from core.runtime.stopsignals import checkDependency
|
||||
|
||||
def buildRecursive(definition, outputs):
|
||||
responses = []
|
||||
@@ -29,19 +30,16 @@ def buildRecursive(definition, outputs):
|
||||
|
||||
outputs["stopsignals"] = []
|
||||
for job in recursiveset:
|
||||
if hasattr(job, "depends"):
|
||||
stop =any(
|
||||
dependency in outputs["stopsignals"]
|
||||
for dependency in job.depends
|
||||
)
|
||||
stop = checkDependency(job, outputs)
|
||||
|
||||
#print(f"STOP SIGNAL DEBUGGING during {job.name}")
|
||||
#print(outputs["stopsignals"])
|
||||
#print(f"STOP SIGNAL DEBUGGING during {job.name}")
|
||||
#print(outputs["stopsignals"])
|
||||
#print(stop)
|
||||
|
||||
if stop:
|
||||
#print("STOP SIGNAL DETECTED")
|
||||
#print(f"Stopping {job.name} due to stop signal")
|
||||
continue
|
||||
if stop:
|
||||
#print("STOP SIGNAL DETECTED")
|
||||
#print(f"Stopping {job.name} due to stop signal")
|
||||
continue
|
||||
|
||||
#print(f"RECURSIVE DEBUG DURING {job.name}")
|
||||
#print(item)
|
||||
|
||||
Reference in New Issue
Block a user