pi_portal.modules.system.supervisor_process

SupervisorProcess class.

class pi_portal.modules.system.supervisor_process.SupervisorProcess(process_name)[source]

Process managed by the SupervisorClient.

Parameters:

process_name (ProcessList) – The Supervisor process name.

start()[source]

Start the specified Supervisor process.

Raises:

SupervisorProcessException

Return type:

None

status()[source]

Return the specified Supervisor process’s status.

Return type:

str

status_in(status)[source]

Check if the Supervisor process is in the list of specified states.

Parameters:

status (List[ProcessStatus]) – A list of statuses to check if the process is in.

Return type:

bool

Returns:

A boolean indicating if the process is one of the states.

stop()[source]

Stop the specified Supervisor process.

Raises:

SupervisorProcessException

Return type:

None

uptime()[source]

Retrieve the uptime the specified Supervisor process.

Return type:

str

Returns:

The uptime of the process.

exception pi_portal.modules.system.supervisor_process.SupervisorProcessException[source]

Raised when a SupervisorProcess is unexpectedly in the wrong state.

with_traceback()

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