ramitkataria commented on code in PR #53903:
URL: https://github.com/apache/airflow/pull/53903#discussion_r2241233540


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -1264,6 +1265,14 @@ def _run_scheduler_loop(self) -> None:
                     except Exception:
                         self.log.exception("Something went wrong when trying 
to save task event logs.")
 
+                with create_session() as session:
+                    for deadline in session.scalars(
+                        select(Deadline)
+                        .where(Deadline.deadline_time < 
datetime.now(timezone.utc))
+                        .where(Deadline.callback_state.is_(None))

Review Comment:
   Maybe add a brief comment about how the `callback_state` being `None` 
implies that the deadline is unhandled



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to