(self, project_conf: dict)
| 596 | return True, "" |
| 597 | |
| 598 | def prep_status(self, project_conf: dict): |
| 599 | try: |
| 600 | prep_pid_file = "{}/{}.pid".format(self._prep_path, project_conf["pjname"]) |
| 601 | pid = public.readFile(prep_pid_file) |
| 602 | if isinstance(pid, str): |
| 603 | ps = psutil.Process(int(pid)) |
| 604 | if ps.is_running() and os.path.samefile(ps.exe(), "/www/server/panel/pyenv/bin/python3") and \ |
| 605 | any("script/py_project_env.py" in tmp for tmp in ps.cmdline()): |
| 606 | return "running" |
| 607 | except: |
| 608 | pass |
| 609 | v_path = project_conf["vpath"] |
| 610 | v_pip: str = self._get_vp_pip(v_path) |
| 611 | v_python: str = self._get_vp_python(v_path) |
| 612 | if not os.path.exists(v_path) or not os.path.exists(v_python) or not os.path.exists(v_pip): |
| 613 | return "failure" |
| 614 | return "complete" |
| 615 | |
| 616 | # 检查输入参数 |
| 617 | def __check_args(self, get): |
no test coverage detected