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

Method __prepare_cmd_start_conf

class/projectModel/pythonModel.py:1007–1029  ·  view source on GitHub ↗
(self, values, pyenv: PythonEnvironment, force=False)

Source from the content-addressed store, hash-verified

1005 )
1006
1007 def __prepare_cmd_start_conf(self, values, pyenv: PythonEnvironment, force=False):
1008 if "project_cmd" not in values or not values["project_cmd"]:
1009 return
1010 cmd_file = "{}/{}_cmd.sh".format(self._script_path, values["pjname"])
1011 if not force and os.path.exists(cmd_file):
1012 return
1013 pid_file = "{}/{}.pid".format(self._pid_path, values["pjname"])
1014 log_file = values['logpath'] + "/error.log"
1015 env_file = "{}/{}.env".format(self._env_path, values["pjname"])
1016
1017 self._create_cmd_file(
1018 cmd_file=cmd_file,
1019 v_ptah_bin=os.path.dirname(self._get_vp_python(values['vpath'])),
1020 project_path=values["path"],
1021 command=values["project_cmd"],
1022 log_file=log_file,
1023 pid_file=pid_file,
1024 env_file=env_file,
1025 activate_sh= pyenv.activate_shell(),
1026 evn_name=public.Md5(values["pjname"]),
1027 )
1028
1029 values["start_sh"] = values["project_cmd"]
1030
1031 def __prepare_python_start_conf(self, values, pyenv: PythonEnvironment, force=False):
1032 if not values["rfile"]:

Callers 1

__prepare_start_confMethod · 0.95

Calls 7

_create_cmd_fileMethod · 0.95
_get_vp_pythonMethod · 0.95
dirnameMethod · 0.80
activate_shellMethod · 0.80
Md5Method · 0.80
formatMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected