Commit 8986fce62be85487b6047f6138f76d52d0276959

Authored by Alexis Koralewski
1 parent 26e955be
Exists in dev

Update start command in pyros.py

Showing 1 changed file with 11 additions and 10 deletions   Show diff stats
@@ -57,11 +57,11 @@ _previous_dir = None @@ -57,11 +57,11 @@ _previous_dir = None
57 # List of all agents that pyros can start, with this format : 57 # List of all agents that pyros can start, with this format :
58 # agent-name : agent-folder-name 58 # agent-name : agent-folder-name
59 AGENTS = { 59 AGENTS = {
60 - "AgentM": "env_monitor",  
61 - "AgentSP": "scientific_programs", 60 + "A_EnvMonitor": "env_monitor",
  61 + "A_SCP_Manager": "scientific_programs",
62 "AgentScheduler": "scheduling", 62 "AgentScheduler": "scheduling",
63 - "AgentImagesProcessor": "img_process",  
64 - "AgentImagesCalibrator": "img_analysis", 63 + "A_ImgProcessor": "img_process",
  64 + "A_ImgCalibrator": "img_analysis",
65 "A_SST": "majordome/agent", 65 "A_SST": "majordome/agent",
66 "Agent": "majordome/agent", 66 "Agent": "majordome/agent",
67 "Agent2": "majordome/agent", 67 "Agent2": "majordome/agent",
@@ -80,10 +80,11 @@ AGENTS = { @@ -80,10 +80,11 @@ AGENTS = {
80 "majordome": "majordome", 80 "majordome": "majordome",
81 #"scheduler": "scheduler", 81 #"scheduler": "scheduler",
82 "alert_manager": "alert_mgmt", 82 "alert_manager": "alert_mgmt",
83 - "AgentImagesProcessor_tnc_up1": "../../../privatedev/plugin/agent",  
84 - "agentBasic": "majordome/agent",  
85 - "AgentTriton": "majordome/agent",  
86 - "AgentMCO":"majordome/agent", 83 + "A_ImagesProcessor_tnc_up1": "../PYROS_OBSERVATORY/pyros_observatory_tnc/agents",
  84 + "A_Basic": "majordome/agent",
  85 + "A_Triton": "majordome/agent",
  86 + "A_MCO":"majordome/agent",
  87 + "A_Majordome":"majordome/agent"
87 } 88 }
88 # AGENTS = ["agentX", "webserver", "monitoring", "majordome", "scheduler", "alert_manager"] 89 # AGENTS = ["agentX", "webserver", "monitoring", "majordome", "scheduler", "alert_manager"]
89 # AGENTS = ["all", "webserver", "monitoring", "majordome", "scheduler", "alert"] 90 # AGENTS = ["all", "webserver", "monitoring", "majordome", "scheduler", "alert"]
@@ -1031,7 +1032,7 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos @@ -1031,7 +1032,7 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos
1031 # if not test_mode(): execProcessFromVenv("start_agent.py " + agent_name + " " + configfile) 1032 # if not test_mode(): execProcessFromVenv("start_agent.py " + agent_name + " " + configfile)
1032 1033
1033 # Agent "agentM", "agentA", "agentB", "agentX", ... 1034 # Agent "agentM", "agentA", "agentB", "agentX", ...
1034 - elif agent_name.startswith("agent") or agent_name.startswith("Agent"): 1035 + elif agent_name.startswith("A_") or agent_name.startswith("A_"):
1035 # Run agent without actual commands sent to devices (FOR_REAL=False) 1036 # Run agent without actual commands sent to devices (FOR_REAL=False)
1036 # agentX.run(FOR_REAL=True) 1037 # agentX.run(FOR_REAL=True)
1037 ''' 1038 '''
@@ -1049,7 +1050,7 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos @@ -1049,7 +1050,7 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos
1049 os.chdir(PYROS_DJANGO_BASE_DIR + os.sep + agent_folder) 1050 os.chdir(PYROS_DJANGO_BASE_DIR + os.sep + agent_folder)
1050 # cmd = "-m AgentX" 1051 # cmd = "-m AgentX"
1051 # cmd = f" Agent{agent_name[5:]}.py {configfile}" 1052 # cmd = f" Agent{agent_name[5:]}.py {configfile}"
1052 - cmd = f"Agent{agent_name[5:]}.py" 1053 + cmd = f"{agent_name}.py"
1053 if debug_mode(): 1054 if debug_mode():
1054 cmd += " -d" 1055 cmd += " -d"
1055 if sim_mode(): 1056 if sim_mode():