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


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -421,6 +421,21 @@ def trigger_dag_run(
             state=DagRunState.QUEUED,
             session=session,
         )
+
+        if dag_deadline := dag.get_dagrun_deadline():
+            Deadline.add_deadline(
+                Deadline(
+                    deadline=dag_deadline.reference.evaluate_with(
+                        interval=dag_deadline.interval,
+                        dag_id=dag.dag_id,
+                    ),
+                    callback=dag_deadline.callback,
+                    callback_kwargs=dag_deadline.callback_kwargs or {},
+                    dag_id=dag.dag_id,
+                    dagrun_id=dag_run.run_id,
+                )
+            )
+

Review Comment:
   > Maybe this should be in models/dag/create_dagrun if they all funnel 
through there?
   
   Yes that could be it indeed. We'd need to verify that they all go through 
there.



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