ferruzzi commented on code in PR #55086:
URL: https://github.com/apache/airflow/pull/55086#discussion_r2320270804


##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -1222,9 +1222,11 @@ def recalculate(self) -> _UnfinishedStates:
                     msg="success",
                 )
 
-            if (deadline := dag.deadline) and isinstance(deadline.reference, 
DeadlineReference.TYPES.DAGRUN):
-                # The dagrun has succeeded.  If there wre any Deadlines for it 
which were not breached, they are no longer needed.
-                Deadline.prune_deadlines(session=session, 
conditions={DagRun.run_id: self.run_id})
+            if dag.deadline:
+                # The dagrun has succeeded.  If there were any Deadlines for 
it which were not breached, they are no longer needed.
+                deadlines = dag.deadline if isinstance(dag.deadline, list) 
else [dag.deadline]

Review Comment:
   As mentioned above, if we store it as a len(1) list, this can go away



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