(self)
| 294 | return [] |
| 295 | |
| 296 | def get_info(self) -> Dict[str, Any]: |
| 297 | if not self.env: |
| 298 | raise RuntimeError('未设置环境') |
| 299 | pid = self.get_service_pid() |
| 300 | public.print_log(pid) |
| 301 | public.print_log(self.name) |
| 302 | public.print_log(self.__class__.__name__) |
| 303 | if isinstance(pid, int) and psutil.pid_exists(pid): |
| 304 | ports = self._get_ports_by_pid(pid) |
| 305 | return { |
| 306 | 'pid': pid, |
| 307 | 'ports': ports |
| 308 | } |
| 309 | return {"pid": None, "ports": []} |
| 310 | |
| 311 | |
| 312 | class MainPythonService(PythonService): |
no test coverage detected