uranusjr commented on code in PR #31772:
URL: https://github.com/apache/airflow/pull/31772#discussion_r1231966785
##########
airflow/models/dag.py:
##########
@@ -3113,11 +3136,9 @@ def deactivate_stale_dags(expiration_date,
session=NEW_SESSION):
time
:return: None
"""
- for dag in (
- session.query(DagModel)
- .filter(DagModel.last_parsed_time < expiration_date,
DagModel.is_active)
- .all()
- ):
+ for dag in session.scalars(
+ select(DagModel).where(DagModel.last_parsed_time <
expiration_date, DagModel.is_active)
+ ).all():
Review Comment:
```suggestion
):
```
--
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]