Stopped returning outputs where it is modified in place
This commit is contained in:
@@ -12,4 +12,4 @@ def buildImage(response, action, outputs):
|
||||
else:
|
||||
print("No response received"),
|
||||
|
||||
return outputs
|
||||
return
|
||||
@@ -53,6 +53,6 @@ def buildOutput(response, action, outputs):
|
||||
#else:
|
||||
# print("No response received"),
|
||||
|
||||
return outputs
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
#from core.execution.action import buildAction
|
||||
import logging
|
||||
|
||||
from core.apirequest import executeRequest
|
||||
|
||||
def responsePolicy(response, action, outputs, resolved):
|
||||
if hasattr(action, "responsepolicy"):
|
||||
if not response.ok:
|
||||
print(response)
|
||||
logging.warning(f"{response} during {action.name}")
|
||||
|
||||
for policy in action.responsepolicy:
|
||||
if policy["statuscode"] == response.status_code:
|
||||
print(policy["print"])
|
||||
logging.warning(policy["print"])
|
||||
|
||||
response, outputs = executeRequest(policy["execute"], outputs, resolved)
|
||||
newresponse, outputs = executeRequest(policy["execute"], outputs, resolved)
|
||||
|
||||
return outputs
|
||||
if policy["response_update"]:
|
||||
logging.info("Updating response")
|
||||
print("Updating response")
|
||||
response = newresponse
|
||||
|
||||
return outputs
|
||||
break
|
||||
|
||||
return response
|
||||
@@ -39,12 +39,12 @@ def buildSelect(action, outputs):
|
||||
if select_data is None:
|
||||
print(f"No data selected during {action.name}")
|
||||
|
||||
return action, outputs
|
||||
return
|
||||
except KeyError as error:
|
||||
print(f"Error in selection of {error} during {action.name}")
|
||||
|
||||
except TypeError as error:
|
||||
print(f"TypeError during select: {error} during {action.name}")
|
||||
|
||||
return action, outputs
|
||||
return
|
||||
|
||||
|
||||
@@ -17,4 +17,4 @@ def addStopSignal(action, outputs, operation):
|
||||
if hasattr(action, "depends"):
|
||||
outputs["processes"][operation.name]["stopsignals"].append(action.alias)
|
||||
#outputs["stopsignals"].append(action.alias)
|
||||
return outputs
|
||||
return
|
||||
Reference in New Issue
Block a user