airflow.utils.state
¶
Module Contents¶
Classes¶
All possible states that a Job can be in. |
|
All possible states that a Task Instance can be in. |
|
All possible states that a DagRun can be in. |
|
Static class with task instance state constants and color methods to avoid hard-coding. |
- class airflow.utils.state.TaskInstanceState[source]¶
-
All possible states that a Task Instance can be in.
Note that None is also allowed, so always use this in a type hint with Optional.
- class airflow.utils.state.DagRunState[source]¶
-
All possible states that a DagRun can be in.
These are “shared” with TaskInstanceState in some parts of the code, so please ensure that their values always match the ones with the same name in TaskInstanceState.
- class airflow.utils.state.State[source]¶
Static class with task instance state constants and color methods to avoid hard-coding.
- finished_dr_states: frozenset[DagRunState][source]¶
- unfinished_dr_states: frozenset[DagRunState][source]¶
- task_states: tuple[TaskInstanceState | None, Ellipsis] = (None,)[source]¶
- dag_states: tuple[DagRunState, Ellipsis] = ()[source]¶
- finished: frozenset[TaskInstanceState][source]¶
A list of states indicating a task has reached a terminal state (i.e. it has “finished”) and needs no further action.
Note that the attempt could have resulted in failure or have been interrupted; or perhaps never run at all (skip, or upstream_failed) in any case, it is no longer running.
- unfinished: frozenset[TaskInstanceState | None][source]¶
A list of states indicating that a task either has not completed a run or has not even started.
- failed_states: frozenset[TaskInstanceState][source]¶
A list of states indicating that a task or dag is a failed state.
- success_states: frozenset[TaskInstanceState][source]¶
A list of states indicating that a task or dag is a success state.