airflow/models/dag.py
def deactivate_stale_dags(expiration_date, session=None):
        """
        Deactivate any DAGs that were last touched by the scheduler before
        the expiration date. These DAGs were likely deleted.

        :param expiration_date: set inactive DAGs that were touched before this
            time
        :type expiration_date: datetime
        :return: None
        """
        for dag in (
            session.query(DagModel)
            .filter(DagModel.last_parsed_time < expiration_date, DagModel.is_active)
            .all()
        ):
            log.info(
                "Deactivating DAG ID %s since it was last touched by the scheduler at %s",
                dag.dag_id,
                dag.last_parsed_time.isoformat(),
            )
            dag.is_active = False
            session.merge(dag)
            session.commit()

        Deactivate any DAGs that were last touched by the scheduler before
        the expiration date. These DAGs were likely deleted.

        :param expiration_date: set inactive DAGs that were touched before this
            time
        :type expiration_date: datetime
        :return: None
        
Deactivate any DAGs that were last touched by the scheduler before
the expiration date. These DAGs were likely deleted.
Deactivate any DAGs that were last touched by the scheduler before the expiration date . These DAGs were likely deleted .
def deactivate_stale_dags(expiration_date, session=None):
        for dag in (
            session.query(DagModel)
            .filter(DagModel.last_parsed_time < expiration_date, DagModel.is_active)
            .all()
        ):
            log.info(
                "Deactivating DAG ID %s since it was last touched by the scheduler at %s",
                dag.dag_id,
                dag.last_parsed_time.isoformat(),
            )
            dag.is_active = False
            session.merge(dag)
            session.commit()
def deactivate_stale_dags ( expiration_date , session = None ) : for dag in ( session . query ( DagModel ) . filter ( DagModel . last_parsed_time < expiration_date , DagModel . is_active ) . all ( ) ) : log . info ( "Deactivating DAG ID %s since it was last touched by the scheduler at %s" , dag . dag_id , dag . last_parsed_time . isoformat ( ) , ) dag . is_active = False session . merge ( dag ) session . commit ( )
Deactivate any DAGs that were last touched by the scheduler before
the expiration date.
Deactivate any DAGs that were last touched by the scheduler before the expiration date .
"""
        Deactivate any DAGs that were last touched by the scheduler before
        the expiration date. These DAGs were likely deleted.

        :param expiration_date: set inactive DAGs that were touched before this
            time
        :type expiration_date: datetime
        :return: None
        """
None
expiration_date
set inactive DAGs that were touched before this
time
set inactive DAGs that were touched before this time
session