potiuk commented on code in PR #29406:
URL: https://github.com/apache/airflow/pull/29406#discussion_r1112342504


##########
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:
   We shoudl add some logging telling that we are doing it. 



-- 
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]

Reply via email to