Separated listener by introducing create listener. Working State. Message loop prevention filters added to server

This commit is contained in:
Lyncoln
2026-10-17 03:42:46 -04:00
parent d260d3681e
commit c7628df30e
14 changed files with 84 additions and 51 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
+13 -6
View File
@@ -9,15 +9,22 @@ def buildLog (action, outputs, response):
f"{outputs[print_key]}",
)
except: (KeyError, TypeError)
except (KeyError, TypeError):
pass
if action.showstatus is True and response.status_code in [200, 204]:
if action.showstatus is True and response.ok:
print(f"{action.name} successful")
elif action.showstatus is True and response.status_code not in [200, 204]:
elif action.showstatus is True and not response.ok:
print(f"{action.name} failed with status code {response.status_code}")
try:
print(f"Response: {response.json()["error"]}")
except KeyError:
print(f"Response:", response.json())
response_data = response.json()
except ValueError:
response_data = response.text
if isinstance(response_data, dict):
print("Response:", response_data.get("error", response_data))
else:
print("Response:", response_data)
return
+4 -4
View File
@@ -2,7 +2,7 @@ import json
def buildOutput(response, action, outputs):
if hasattr(action, "outputs"):
if response != None:
if response is not None:
try:
response_data = response.json()
except AttributeError:
@@ -20,13 +20,13 @@ def buildOutput(response, action, outputs):
for output_name, response_key in action.outputs.items():
if key == response_key:
outputs[output_name] = value
return outputs
else:
return outputs
print("No response received"),
#return outputs
return outputs
+2 -2
View File
@@ -11,8 +11,8 @@ def recursiveSet(definition, outputs):
for job in recursiveset:
outputs, response = buildAction(job, outputs)
print("MESSAGE BODY DEBUG")
print(resolved["messages"])
#print("MESSAGE BODY DEBUG")
#print(resolved["messages"])
return outputs
from core.execution.action.action import buildAction