process_manager_interface
interfaces.process_manager_interface
Module providing functions to interact with the drunc process manager.
Classes
ProcessAction
Bases: Enum
Enum for process actions.
Functions
boot_process(user, data)
Boot a process with the given data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
str
|
the user to boot the process as. |
required |
data
|
dict[str, str | int]
|
the data for the process. |
required |
Source code in interfaces/process_manager_interface.py
get_hostnames(user)
Get the hostnames of the processes for the given user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
str
|
The user to get the hostnames for. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
The hostnames of the processes for the given user. |
Source code in interfaces/process_manager_interface.py
get_process_logs(uuid, username)
Retrieve logs for a process from the process manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uuid
|
str
|
UUID of the process. |
required |
username
|
str
|
Username of the user requesting the logs |
required |
Returns:
| Type | Description |
|---|---|
list[DecodedResponse]
|
The process logs. |
Source code in interfaces/process_manager_interface.py
get_process_manager_driver(username)
Get a ProcessManagerDriver instance.
Source code in interfaces/process_manager_interface.py
get_session_info(username)
process_call(uuids, action, username)
Perform an action on a process with a given UUID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uuids
|
Iterable[str]
|
List of UUIDs of the process to be actioned. |
required |
action
|
ProcessAction
|
Action to be performed {restart,flush,kill}. |
required |
username
|
str
|
Username of the user performing the action |
required |