pi_portal.modules.system.supervisor
A Supervisord client over a unix socket.
- class pi_portal.modules.system.supervisor.SupervisorClient(host='localhost', port=9001)[source]
A Supervisor client that connects via the local unix socket.
- Parameters:
host (
str, default:'localhost') – Unused, instead the transport uses a unix socket.port (
int, default:9001) – Unused, instead the transport uses a unix socket.
- start(process)[source]
Start the specified Supervisor process.
- Parameters:
process (
ProcessList) – The process to start.- Raises:
- Return type:
None
- start_time(process)[source]
Retrieve the start time of the specified Supervisor process.
- Parameters:
process (
ProcessList) – The process to retrieve the uptime of.- Return type:
str- Returns:
The uptime of the queried process.
- Raises:
- status(process)[source]
Retrieve the current state of the specified Supervisor process.
- Parameters:
process (
ProcessList) – The process to retrieve the status of.- Return type:
- Returns:
The status of the queried process.
- Raises:
- stop(process)[source]
Stop the specified Supervisor process.
- Parameters:
process (
ProcessList) – The process to stop.- Raises:
- Return type:
None