Created process registry and introduced preparatory code
This commit is contained in:
@@ -3,8 +3,11 @@ 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
|
||||
from core.execution.processregistry import registerProcess
|
||||
|
||||
def buildRecursive(definition, outputs):
|
||||
outputs = registerProcess(definition, outputs)
|
||||
|
||||
responses = []
|
||||
from core.execution.executioncontract import executeContract
|
||||
recursiveset = definition.recursiveset["actions"]
|
||||
@@ -30,6 +33,7 @@ def buildRecursive(definition, outputs):
|
||||
|
||||
outputs["stopsignals"] = []
|
||||
for job in recursiveset:
|
||||
|
||||
stop = checkDependency(job, outputs)
|
||||
|
||||
#print(f"STOP SIGNAL DEBUGGING during {job.name}")
|
||||
@@ -37,6 +41,7 @@ def buildRecursive(definition, outputs):
|
||||
#print(stop)
|
||||
|
||||
if stop:
|
||||
outputs["processes"][definition.name]["stopsignals"].append(job.alias)
|
||||
#print("STOP SIGNAL DETECTED")
|
||||
#print(f"Stopping {job.name} due to stop signal")
|
||||
continue
|
||||
@@ -44,9 +49,16 @@ def buildRecursive(definition, outputs):
|
||||
#print(f"RECURSIVE DEBUG DURING {job.name}")
|
||||
#print(item)
|
||||
#outputs, response = buildAction(job, outputs)
|
||||
if job.kind == "action":
|
||||
outputs["processes"][definition.name][job.name] = {}
|
||||
|
||||
outputs, response = executeContract(job, outputs)
|
||||
responses.append(response)
|
||||
if job.kind == "action":
|
||||
outputs["processes"][definition.name][job.name]["response"] = response
|
||||
|
||||
outputs["processes"][definition.name]["completed"].append(job.alias)
|
||||
|
||||
|
||||
retain = definition.recursiveset.get("retain", True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user