MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / get_run_status

Method get_run_status

mod/project/java/groupMod.py:1164–1186  ·  view source on GitHub ↗
(get)

Source from the content-addressed store, hash-verified

1162
1163 @staticmethod
1164 def get_run_status(get):
1165 last_write_time = 0
1166 try:
1167 group_id = get.group_id.strip()
1168 if hasattr(get, "last_write_time") and get.last_write_time:
1169 last_write_time = float(get.last_write_time)
1170 except:
1171 return json_response(status=False, msg="参数错误")
1172
1173 g = Group(group_id)
1174 if not g.config:
1175 return json_response(status=False, msg="项目组不存在")
1176
1177 run_status = g.run_status(last_write_time)
1178 run_status["running_step"] = None
1179 if isinstance(run_status, dict):
1180 if isinstance(run_status["running_data"], dict) and "projects" in run_status["running_data"]:
1181 projects = run_status["running_data"]["projects"]
1182 for i in projects:
1183 if i["running"] is True:
1184 run_status["running_step"] = i
1185
1186 return json_response(status=True, data=run_status)
1187
1188 @staticmethod
1189 def termination_operation(get):

Callers

nothing calls this directly

Calls 3

run_statusMethod · 0.95
json_responseFunction · 0.90
GroupClass · 0.70

Tested by

no test coverage detected