msumit commented on a change in pull request #11462:
URL: https://github.com/apache/airflow/pull/11462#discussion_r504406285
##########
File path: airflow/models/dag.py
##########
@@ -1842,16 +1842,17 @@ def deactivate_stale_dags(expiration_date,
session=None):
:type expiration_date: datetime
:return: None
"""
- for dag in session.query(
- DagModel).filter(DagModel.last_scheduler_run < expiration_date,
- DagModel.is_active).all():
+ query = session.query(DagModel).filter(DagModel.last_scheduler_run <
expiration_date,
Review comment:
Ooh is it? Then should it be taken care of while doing serialization
itself? Like, mark the dag inactive if it doesn't find it anymore?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]