pi_portal.modules.system.supervisor_process.SupervisorProcess

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

Bases: object

Process managed by the SupervisorClient.

Parameters:

process_name (ProcessList) – The Supervisor process name.

__init__(process_name: ProcessList) None[source]
is_running() bool[source]

Return whether the process is currently in a running state.

Return type:

bool

start() None[source]

Start the specified Supervisor process.

Raises:

SupervisorProcessException

status() str[source]

Return the specified Supervisor process’s status.

Return type:

str

status_in(status: List[ProcessStatus]) bool[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.

Returns:

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

Return type:

bool

stop() None[source]

Stop the specified Supervisor process.

Raises:

SupervisorProcessException

uptime() str[source]

Retrieve the uptime the specified Supervisor process.

Returns:

The uptime of the process.

Return type:

str