Skip to main content

Module pid

Module pid 

Source
Expand description

PID tracking for running work processes

Provides functionality to track and manage running agent processes associated with specs being worked on.

Functions§

cleanup_stale_pids
Clean up stale PID files (where process is no longer running)
ensure_pids_dir
Ensure the PIDs directory exists
is_process_running
Check if a process with the given PID is running
list_active_pids
List all specs with active PID files
read_pid_file
Read PID from a spec’s PID file
remove_pid_file
Remove PID file for a spec
remove_process_files
Remove process JSON files for a spec Matches files like .chant/processes/{spec_id}-{pid}.json
stop_process
Stop a process with the given PID
stop_spec_work
Stop the work process for a spec
write_pid_file
Write a PID file for a spec