mis98zb commented on code in PR #30965:
URL: https://github.com/apache/airflow/pull/30965#discussion_r1209961530
##########
airflow/models/dag.py:
##########
@@ -2698,10 +2698,16 @@ 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. DAG will continue to run until finished "
+ "and be marked as failed."
+ )
Review Comment:
I see. Thank you for the advise.
--
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]