uranusjr commented on code in PR #30965:
URL: https://github.com/apache/airflow/pull/30965#discussion_r1205050272


##########
airflow/models/dag.py:
##########
@@ -2698,10 +2698,13 @@ def add_logger_if_needed(ti: TaskInstance):
         # than creating a BackfillJob and allows us to surface logs to the user
         while dr.state == State.RUNNING:
             schedulable_tis, _ = dr.update_state(session=session)
-            for ti in schedulable_tis:
-                add_logger_if_needed(ti)
-                ti.task = tasks[ti.task_id]
-                _run_task(ti, session=session)
+            try:
+                for ti in schedulable_tis:
+                    add_logger_if_needed(ti)
+                    ti.task = tasks[ti.task_id]
+                    _run_task(ti, session=session)
+            except Exception:
+                self.log.info("Task failed, continue looping. DAG will be 
marked as failed at the end of looping.")

Review Comment:
   ```suggestion
                   self.log.info(
                       "Task failed. DAG will continue to run until finished "
                       "and be marked as failed."
                   )
   ```



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