sunank200 commented on code in PR #54941:
URL: https://github.com/apache/airflow/pull/54941#discussion_r2330843972
##########
airflow-core/src/airflow/utils/state.py:
##########
@@ -59,20 +32,20 @@ class TaskInstanceState(str, Enum):
# Use None instead if need this state.
# Set by the scheduler
- REMOVED = TerminalTIState.REMOVED # Task vanished from DAG before it ran
- SCHEDULED = IntermediateTIState.SCHEDULED # Task should run and will be
handed to executor soon
+ REMOVED = "removed" # Task vanished from DAG before it ran
+ SCHEDULED = "scheduled" # Task should run and will be handed to executor
soon
# Set by the task instance itself
- QUEUED = IntermediateTIState.QUEUED # Executor has enqueued the task
+ QUEUED = "queued" # Executor has enqueued the task
RUNNING = "running" # Task is executing
- SUCCESS = TerminalTIState.SUCCESS # Task completed
- RESTARTING = IntermediateTIState.RESTARTING # External request to restart
(e.g. cleared when running)
- FAILED = TerminalTIState.FAILED # Task errored out
- UP_FOR_RETRY = IntermediateTIState.UP_FOR_RETRY # Task failed but has
retries left
- UP_FOR_RESCHEDULE = IntermediateTIState.UP_FOR_RESCHEDULE # A waiting
`reschedule` sensor
- UPSTREAM_FAILED = TerminalTIState.UPSTREAM_FAILED # One or more upstream
deps failed
- SKIPPED = TerminalTIState.SKIPPED # Skipped by branching or some other
mechanism
- DEFERRED = IntermediateTIState.DEFERRED # Deferrable operator waiting on
a trigger
+ SUCCESS = "success" # Task completed
+ RESTARTING = "restarting" # External request to restart (e.g. cleared
when running)
+ FAILED = "failed" # Task errored out
+ UP_FOR_RETRY = "up_for_retry" # Task failed but has retries left
+ UP_FOR_RESCHEDULE = "up_for_reschedule" # A waiting `reschedule` sensor
+ UPSTREAM_FAILED = "upstream_failed" # One or more upstream deps failed
+ SKIPPED = "skipped" # Skipped by branching or some other mechanism
+ DEFERRED = "deferred" # Deferrable operator waiting on a trigger
Review Comment:
Moved the `TaskInstanceState` to taskinstance.py` in model.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]