()
| 64 | |
| 65 | |
| 66 | def start_kernel_manager(): |
| 67 | global kernel_manager_process |
| 68 | |
| 69 | kernel_manager_script_path = os.path.join( |
| 70 | pathlib.Path(__file__).parent.resolve(), "kernel_manager.py" |
| 71 | ) |
| 72 | kernel_manager_process = subprocess.Popen( |
| 73 | [sys.executable, kernel_manager_script_path] |
| 74 | ) |
| 75 | |
| 76 | # Write PID as <pid>.pid to config.KERNEL_PID_DIR |
| 77 | os.makedirs(config.KERNEL_PID_DIR, exist_ok=True) |
| 78 | with open(os.path.join(config.KERNEL_PID_DIR, "%d.pid" % kernel_manager_process.pid), "w") as p: |
| 79 | p.write("kernel_manager") |
| 80 | |
| 81 | |
| 82 | def cleanup_kernel_program(): |
no outgoing calls
no test coverage detected