(get)
| 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): |
nothing calls this directly
no test coverage detected