RachitSharma2001 commented on code in PR #29406:
URL: https://github.com/apache/airflow/pull/29406#discussion_r1116018115
##########
airflow/models/taskinstance.py:
##########
@@ -172,6 +172,19 @@ def set_current_context(context: Context) ->
Generator[Context, None, None]:
)
+def stop_all_tasks_in_dag(tis: list[TaskInstance], session: Session,
task_id_to_ignore: int):
+ for ti in tis:
+ if ti.task_id == task_id_to_ignore or ti.state in (
+ TaskInstanceState.SUCCESS,
+ TaskInstanceState.FAILED,
+ ):
+ continue
+ if ti.state == TaskInstanceState.RUNNING:
+ ti.error(session)
Review Comment:
Sounds good! I have added a logging statement for when a running task is
being force failed, and when a task is being set to the skipped state. Let me
know if these log statements are good or if there are anything to change.
--
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]