"""
        Set ``is_active=False`` on the DAGs for which the DAG files have been removed.
        :param alive_dag_filelocs: file paths of alive DAGs
        :param session: ORM Session
        """
        log.debug("Deactivating DAGs (for which DAG files are deleted) from %s table ", cls.__tablename__)
        dag_models = session.query(cls).all()
        for dag_model in dag_models:
            if dag_model.fileloc is not None and dag_model.fileloc not in alive_dag_filelocs:
                dag_model.is_active = False
            else:
                continue
    @classmethod
    def dags_needing_dagruns(cls, session: Session) -> tuple[Query, dict[str, tuple[datetime, datetime]]]: