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

Method get_info

mod/project/python/serviceMod.py:296–309  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
312class MainPythonService(PythonService):

Callers 2

get_infoMethod · 0.45
get_services_infoMethod · 0.45

Calls 4

get_service_pidMethod · 0.95
_get_ports_by_pidMethod · 0.95
print_logMethod · 0.45
pid_existsMethod · 0.45

Tested by

no test coverage detected