From 92583b558b1d512990fbf51419b76dc42946599a Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Fri, 13 Oct 2023 09:50:17 +0200 Subject: [PATCH] update pyros start command to enable run of AD --- pyros.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pyros.py b/pyros.py index e457551..bdc7d60 100755 --- a/pyros.py +++ b/pyros.py @@ -84,7 +84,8 @@ AGENTS = { "A_Basic": "majordome/agent", "A_Triton": "majordome/agent", "A_MCO":"majordome/agent", - "A_Majordome":"majordome/agent" + "A_Majordome":"majordome/agent", + "AD_PLC":"env_monitor" } # AGENTS = ["agentX", "webserver", "monitoring", "majordome", "scheduler", "alert_manager"] # AGENTS = ["all", "webserver", "monitoring", "majordome", "scheduler", "alert"] @@ -1009,8 +1010,8 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos current_dir = os.getcwd() # OLD format agents: majordome, monitoring, alert... - cmd = "start_agent.py " + agent_name + " " + configfile - + #cmd = "start_agent.py " + agent_name + " " + configfile + cmd = "" # Agent "webserver" if agent_name == "webserver": cmd = "manage.py runserver 127.0.0.1:8080" @@ -1022,7 +1023,7 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos # if not test_mode(): execProcessFromVenv("start_agent.py " + agent_name + " " + configfile) # Agent "agentM", "agentA", "agentB", "agentX", ... - elif agent_name.startswith("A_") or agent_name.startswith("A_"): + elif agent_name.startswith("A_") or agent_name.startswith("AD_"): # Run agent without actual commands sent to devices (FOR_REAL=False) # agentX.run(FOR_REAL=True) ''' @@ -1361,6 +1362,7 @@ def change_dir(path): def _check_agent(agent): # Check that agent exists if agent != "all" and agent not in AGENTS.keys(): + # Check if multiple agents: print("This agent does not exist") print("Here is the allowed list of agents:") -- libgit2 0.21.2