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


##########
airflow-core/src/airflow/models/trigger.py:
##########
@@ -366,9 +386,9 @@ def get_sorted_triggers(cls, capacity: int, 
alive_triggerer_ids: list[int] | Sel
         )
         asset_triggers = session.execute(query).all()
 
-        # Add triggers associated to assets after triggers associated to tasks
-        # It prioritizes DAGs over event driven scheduling which is fair
-        return ti_triggers + asset_triggers
+        # Add triggers associated to deadlines first, then tasks, then assets
+        # It prioritizes deadline triggers, then DAGs over event driven 
scheduling which is fair
+        return deadline_triggers + ti_triggers + asset_triggers

Review Comment:
   Do we need to limit this list to `capacity` length?  We're limiting the 
deadlines results, but could then go over capacity when adding the others, 
right?



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