jkramer-ginkgo commented on a change in pull request #21770:
URL: https://github.com/apache/airflow/pull/21770#discussion_r813288999
##########
File path: airflow/models/trigger.py
##########
@@ -184,7 +184,10 @@ def assign_unassigned(cls, triggerer_id, capacity,
session=None):
# Find triggers who do NOT have an alive triggerer_id, and then assign
# up to `capacity` of those to us.
trigger_ids_query = (
-
session.query(cls.id).filter(cls.triggerer_id.notin_(alive_triggerer_ids)).limit(capacity).all()
+ session.query(cls.id)
+ .filter(or_(cls.triggerer_id.notin_(alive_triggerer_ids),
cls.triggerer_id == None)) # noqa: E711
Review comment:
no, unfortunately that's a quirk with sqlalchemy's `notin_` (test fails
when that's removed). I'll add a comment to that effect
--
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]