https://github.com/apache/airflow/blob/main/airflow/dag_processing/manager.py#L773
"""
        Detects DAGs which are no longer present in files.
        Deactivate them and remove them in the serialized_dag table
        """
        now = timezone.utcnow()
        elapsed_time_since_refresh = (now - self.last_deactivate_stale_dags_time).total_seconds()
        if elapsed_time_since_refresh > self.parsing_cleanup_interval:
            last_parsed = {
                fp: self.get_last_finish_time(fp) for fp in self.file_paths if self.get_last_finish_time(fp)
            }
            to_deactivate = set()
            query = session.query(DagModel.dag_id, DagModel.fileloc, DagModel.last_parsed_time).filter(
                DagModel.is_active
            )
            if self.standalone_dag_processor:
                query = query.filter(DagModel.processor_subdir == self.get_dag_directory())
            dags_parsed = query.all()
            for dag in dags_parsed:
                
                
                
                if (
                    dag.fileloc in last_parsed
                    and (dag.last_parsed_time + self._processor_timeout) < last_parsed[dag.fileloc]
                ):
                    self.log.info("DAG %s is missing and will be deactivated.", dag.dag_id)