(self)
| 272 | pass |
| 273 | |
| 274 | def get_log(self) -> str: |
| 275 | if not self.env: |
| 276 | raise RuntimeError('未设置环境') |
| 277 | log_file = os.path.join(SERVICE_PATH, '{}/{}.log'.format(self.env.project_name, self.name)) |
| 278 | if not os.path.isfile(log_file): |
| 279 | return '暂无日志' |
| 280 | data = public.GetNumLines(log_file, 1000) |
| 281 | if not data: |
| 282 | return '暂无日志' |
| 283 | return data |
| 284 | |
| 285 | @staticmethod |
| 286 | def _get_ports_by_pid(pid: int) -> List[int]: |
no test coverage detected