INNER CODE UNIT · Python
_is_comfyui_process_alive
runpod-workers/worker-comfyui · handler.py:245
def _is_comfyui_process_alive():
"""Check whether the ComfyUI process is still running.
Returns True if alive, False if dead, None if PID file not found.
"""
pid = _get_comfyui_pid()
if pid is None:
return None
try:
os.kill(pid, 0)
return True
except ProcessLookupError:
return False
except PermissionError:
return True # process exists but we can't signal it
def check_server(url, retries=0, delay=50):