enums
Package for providing enumerations for interfaces
ReturnCode
Bases: IntEnum
Enum for Merlin return codes.
This class defines various return codes used in the Merlin system to indicate the status of operations. Each return code corresponds to a specific outcome of a process.
Attributes:
| Name | Type | Description |
|---|---|---|
OK |
int
|
Indicates a successful operation. Numeric value: 0. |
ERROR |
int
|
Indicates a general error occurred. Numeric value: 1. |
RESTART |
int
|
Indicates that the process should be restarted. Numeric value: 100. |
SOFT_FAIL |
int
|
Indicates a non-critical failure that allows for recovery. Numeric value: 101. |
HARD_FAIL |
int
|
Indicates a critical failure that cannot be recovered from. Numeric value: 102. |
DRY_OK |
int
|
Indicates a successful operation in a dry run (no changes made). Numeric value: 103. |
RETRY |
int
|
Indicates that the operation should be retried. Numeric value: 104. |
STOP_WORKERS |
int
|
Indicates that worker processes should be stopped. Numeric value: 105. |
RAISE_ERROR |
int
|
Indicates that an error should be raised. Numeric value: 106. |
Source code in merlin/common/enums.py
RunStatus
Bases: Enum
Enumeration of possible run statuses.
Attributes:
| Name | Type | Description |
|---|---|---|
INITIALIZED |
Run has been created in the database but not queued. |
|
QUEUED |
Run is queued and waiting to start. |
|
RUNNING |
Run is currently executing. |
|
COMPLETED |
Run has finished successfully. |
|
CANCELLED |
Run was cancelled by the user. |
|
FAILED |
Run failed due to an error. |
Source code in merlin/common/enums.py
WorkerStatus
Bases: Enum
Status of Merlin workers.
Attributes:
| Name | Type | Description |
|---|---|---|
RUNNING |
str
|
Indicates the worker is running. String value: "running". |
STALLED |
str
|
Indicates the worker is running but hasn't been processing work. String value: "stalled". |
STOPPED |
str
|
Indicates the worker is not running. String value: "stopped". |
REBOOTING |
str
|
Indicates the worker is actively restarting itself. String value: "rebooting". |