Extended buildRuntimeAttr to consume resolved so that resolver can be used for readItems in monitor. Runtime contract extended to differentiate between action and monitor
This commit is contained in:
@@ -21,13 +21,13 @@ def buildAction (action, outputs):
|
||||
response, outputs = executeRequest(action, outputs, resolved)
|
||||
recursiveresponses.append(response)
|
||||
|
||||
outputs, response = buildRuntimeAttr(action, outputs, response)
|
||||
outputs, response = buildRuntimeAttr(action, outputs, resolved, response)
|
||||
|
||||
return outputs, recursiveresponses
|
||||
|
||||
else:
|
||||
outputs, resolved = buildPreRuntimeAttr(action, outputs)
|
||||
response, outputs = executeRequest(action, outputs, resolved)
|
||||
outputs, response = buildRuntimeAttr(action, outputs, response)
|
||||
outputs, response = buildRuntimeAttr(action, outputs, resolved, response)
|
||||
|
||||
return outputs, response
|
||||
|
||||
@@ -1,25 +1,34 @@
|
||||
from core.runtime import buildSelect, buildOutput, buildSave, loadSave, buildLog
|
||||
from core.runtime import buildSelect, buildOutput, buildSave, loadSave, saveRow, buildLog
|
||||
from core.runtime.image import buildImage
|
||||
#from core.runtime.select import buildSelect3
|
||||
from core.runtime.resolver import resolveItem
|
||||
|
||||
def buildPreRuntimeAttr(action, outputs):
|
||||
outputs = loadSave(action, outputs)
|
||||
if action.kind == "action":
|
||||
outputs = loadSave(action, outputs)
|
||||
resolved = resolveItem(action, outputs)
|
||||
return outputs, resolved
|
||||
elif action.kind == "monitor":
|
||||
outputs = loadSave(action, outputs)
|
||||
resolved = {}
|
||||
return outputs, resolved
|
||||
|
||||
resolved = resolveItem(action, outputs)
|
||||
#print("RESOLVER DEBUG")
|
||||
#print(resolved)
|
||||
return outputs, resolved
|
||||
def buildRuntimeAttr(action, outputs, resolved, response):
|
||||
if action.kind == "action":
|
||||
outputs = buildOutput(response, action, outputs)
|
||||
|
||||
def buildRuntimeAttr(action, outputs, response):
|
||||
outputs = buildOutput(response, action, outputs)
|
||||
outputs = buildImage(response, action, outputs)
|
||||
|
||||
outputs = buildImage(response, action, outputs)
|
||||
select_data, action, outputs = buildSelect(action, outputs)
|
||||
|
||||
select_data, action, outputs = buildSelect(action, outputs)
|
||||
buildSave(action, outputs)
|
||||
|
||||
buildSave(action, outputs)
|
||||
saveRow(action, outputs, resolved)
|
||||
|
||||
buildLog(action, outputs, response)
|
||||
buildLog(action, outputs, response)
|
||||
|
||||
return outputs, response
|
||||
return outputs, response
|
||||
elif action.kind == "monitor":
|
||||
#readitems = resolveItem(action, response.json())
|
||||
#print(readitems)
|
||||
return outputs, response
|
||||
Reference in New Issue
Block a user