ferruzzi commented on code in PR #51638:
URL: https://github.com/apache/airflow/pull/51638#discussion_r2145529882
##########
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:
I think you are right, I was conflating API and SDK and thought all dagrun
creations fed through here. Maybe this should be in models/dag/create_dagrun
if they all funnel 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]