|
| 1 | +"""Contains enums related to workflows and executions""" |
| 2 | +from aenum import UniqueEnum |
| 3 | + |
| 4 | + |
| 5 | +class ExecutionStatus(UniqueEnum): |
| 6 | + """Workflow execution statuses""" |
| 7 | + |
| 8 | + aborted = "ABORTED" |
| 9 | + failed = "FAILED" |
| 10 | + running = "RUNNING" |
| 11 | + succeeded = "SUCCEEDED" |
| 12 | + timed_out = "TIMED_OUT" |
| 13 | + |
| 14 | + |
| 15 | +# Set of statuses that indicate an execution completed |
| 16 | +COMPLETED_STATUSES = { |
| 17 | + ExecutionStatus.aborted, |
| 18 | + ExecutionStatus.failed, |
| 19 | + ExecutionStatus.succeeded, |
| 20 | + ExecutionStatus.timed_out, |
| 21 | +} |
| 22 | + |
| 23 | + |
| 24 | +class ExecutionEventType(UniqueEnum): |
| 25 | + """Execution history event type.""" |
| 26 | + |
| 27 | + choice_state_entered = "ChoiceStateEntered" |
| 28 | + choice_state_exited = "ChoiceStateExited" |
| 29 | + execution_aborted = "ExecutionAborted" |
| 30 | + execution_failed = "ExecutionFailed" |
| 31 | + execution_started = "ExecutionStarted" |
| 32 | + execution_succeeded = "ExecutionSucceeded" |
| 33 | + execution_timed_out = "ExecutionTimedOut" |
| 34 | + fail_state_entered = "FailStateEntered" |
| 35 | + lambda_function_failed = "LambdaFunctionFailed" |
| 36 | + lambda_function_schedule_failed = "LambdaFunctionScheduleFailed" |
| 37 | + lambda_function_scheduled = "LambdaFunctionScheduled" |
| 38 | + lambda_function_start_failed = "LambdaFunctionStartFailed" |
| 39 | + lambda_function_started = "LambdaFunctionStarted" |
| 40 | + lambda_function_succeeded = "LambdaFunctionSucceeded" |
| 41 | + lambda_function_timed_out = "LambdaFunctionTimedOut" |
| 42 | + parallel_state_aborted = "ParallelStateAborted" |
| 43 | + parallel_state_entered = "ParallelStateEntered" |
| 44 | + parallel_state_exited = "ParallelStateExited" |
| 45 | + parallel_state_failed = "ParallelStateFailed" |
| 46 | + parallel_state_started = "ParallelStateStarted" |
| 47 | + parallel_state_succeeded = "ParallelStateSucceeded" |
| 48 | + pass_state_entered = "PassStateEntered" |
| 49 | + pass_state_exited = "PassStateExited" |
| 50 | + succeed_state_entered = "SucceedStateEntered" |
| 51 | + succeed_state_exited = "SucceedStateExited" |
| 52 | + task_failed = "TaskFailed" |
| 53 | + task_scheduled = "TaskScheduled" |
| 54 | + task_start_failed = "TaskStartFailed" |
| 55 | + task_started = "TaskStarted" |
| 56 | + task_state_aborted = "TaskStateAborted" |
| 57 | + task_state_entered = "TaskStateEntered" |
| 58 | + task_state_exited = "TaskStateExited" |
| 59 | + task_submit_failed = "TaskSubmitFailed" |
| 60 | + task_submitted = "TaskSubmitted" |
| 61 | + task_succeeded = "TaskSucceeded" |
| 62 | + task_timed_out = "TaskTimedOut" |
| 63 | + wait_state_aborted = "WaitStateAborted" |
| 64 | + wait_state_entered = "WaitStateEntered" |
| 65 | + wait_state_exited = "WaitStateExited" |
0 commit comments