(self, project_id)
| 3428 | return cpu_time |
| 3429 | |
| 3430 | def get_project_status(self, project_id): |
| 3431 | # 仅使用在项目停止告警中 |
| 3432 | project_info = public.M('sites').where('project_type=? AND id=?', ('Python', project_id)).find() |
| 3433 | if not project_info: |
| 3434 | return None, project_info["name"] |
| 3435 | if self.is_stop_by_user(project_id): |
| 3436 | return True, project_info["name"] |
| 3437 | project_config = json.loads(project_info['project_config']) |
| 3438 | res = self.get_project_run_state(project_name=project_info["name"]) |
| 3439 | return bool(res), project_info["name"] |
| 3440 | |
| 3441 | |
| 3442 | @staticmethod |
nothing calls this directly
no test coverage detected