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:

SupervisorException

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:

SupervisorException

status(process)[source]

Retrieve the current state of the specified Supervisor process.

Parameters:

process (ProcessList) – The process to retrieve the status of.

Return type:

ProcessStatus

Returns:

The status of the queried process.

Raises:

SupervisorException

stop(process)[source]

Stop the specified Supervisor process.

Parameters:

process (ProcessList) – The process to stop.

Raises:

SupervisorException

Return type:

None

exception pi_portal.modules.system.supervisor.SupervisorException[source]

Exceptions for the SupervisorClient class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class pi_portal.modules.system.supervisor.TypeSupervisorProcessInfo[source]

Typed representation of a Supervisor getProcessInfo response.