(self)
| 326 | |
| 327 | # 获取可操作状态的信息 |
| 328 | def get_operation_info(self) -> Tuple[Iterable[str], str]: |
| 329 | pid_file = "{}/{}.pid".format(Group.GROUP_TMP_DIR, self.group_id) |
| 330 | try: |
| 331 | pid = int(public.readFile(pid_file)) |
| 332 | p = psutil.Process(pid) |
| 333 | if not p.is_running(): |
| 334 | return ("start", "stop"), "" |
| 335 | else: |
| 336 | last_cmd = p.cmdline()[-2] if len(p.cmdline()) == 4 else "" |
| 337 | return ("termination",), last_cmd |
| 338 | |
| 339 | except: |
| 340 | pass |
| 341 | return ("start", "stop"), "" |
| 342 | |
| 343 | def group_info(self, project_cache: Optional[dict] = None) -> Optional[dict]: |
| 344 | if not self.config: |
no test coverage detected