uranusjr commented on code in PR #32645:
URL: https://github.com/apache/airflow/pull/32645#discussion_r1266199740
##########
airflow/models/trigger.py:
##########
@@ -218,10 +229,13 @@ def assign_unassigned(cls, triggerer_id, capacity,
heartrate, session: Session =
health_check_threshold = heartrate * 2.1
alive_triggerer_ids = [
row[0]
- for row in session.query(Job.id).filter(
- Job.end_date.is_(None),
- Job.latest_heartbeat > timezone.utcnow() -
datetime.timedelta(seconds=health_check_threshold),
- Job.job_type == "TriggererJob",
+ for row in session.execute(
Review Comment:
Same as above, this can use `scalars` to get rid of the `row[0] for row in
...` thing
--
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]