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