sunank200 commented on code in PR #55292:
URL: https://github.com/apache/airflow/pull/55292#discussion_r2330959445
##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -1369,14 +1388,14 @@ def _run_task(*, ti, task, run_triggerer=False):
# Set the state to SCHEDULED so that the task can be resumed.
with create_session() as session:
- ti.state = State.SCHEDULED
+ ti.state = TaskInstanceState.SCHEDULED
session.add(ti)
return taskrun_result
except Exception:
log.exception("[DAG TEST] Error running task %s", ti)
- if ti.state not in State.finished:
- ti.set_state(State.FAILED)
+ if ti.state not in FINISHED_STATES:
+ ti.set_state(TaskInstanceState.FAILED)
Review Comment:
Yes, I wanted to split the `State` separately. In this PR, I just wanted to
remove the `State` dependency in task-sdk
--
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]