(cmd_file, v_ptah_bin, project_path, command, log_file, pid_file, env_file, activate_sh='', evn_name="")
| 1074 | |
| 1075 | @staticmethod |
| 1076 | def _create_cmd_file(cmd_file, v_ptah_bin, project_path, command, log_file, pid_file, env_file, activate_sh='', evn_name=""): |
| 1077 | start_cmd = '''#!/bin/bash |
| 1078 | PATH={v_ptah_bin}:{project_path}:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
| 1079 | export PATH |
| 1080 | export BT_PYTHON_SERVICE_SID={sid} |
| 1081 | {activate_sh} |
| 1082 | source {env_file} |
| 1083 | cd {project_path} |
| 1084 | nohup {command} &>> {log_file} & |
| 1085 | echo $! > {pid_file}'''.format( |
| 1086 | v_ptah_bin=v_ptah_bin, |
| 1087 | activate_sh=activate_sh, |
| 1088 | project_path=project_path, |
| 1089 | command=command, |
| 1090 | log_file=log_file, |
| 1091 | pid_file=pid_file, |
| 1092 | env_file=env_file, |
| 1093 | sid=evn_name, |
| 1094 | ) |
| 1095 | public.writeFile(cmd_file, start_cmd) |
| 1096 | |
| 1097 | def _get_cmd_file(self, project_conf): |
| 1098 | cmd_file_map = { |
no test coverage detected