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


##########
airflow-core/src/airflow/models/deadline.py:
##########
@@ -220,9 +220,12 @@ class DagRunQueuedAtDeadline(BaseDeadlineReference):
 
         required_kwargs = {"dag_id"}
 
-        def _evaluate_with(self, **kwargs: Any) -> datetime:
+        @provide_session
+        def _evaluate_with(self, session=NEW_SESSION, **kwargs: Any) -> 
datetime:
             from airflow.models import DagRun
 
+            session.flush()

Review Comment:
   Why do we need to flush here?



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