diff --git a/airflow/utils/dag_processing.py b/airflow/utils/dag_processing.py index 4a4b24087dc05..df2df47bec1ea 100644 --- a/airflow/utils/dag_processing.py +++ b/airflow/utils/dag_processing.py @@ -50,7 +50,6 @@ from airflow.exceptions import AirflowException from airflow.settings import Stats from airflow.models import errors -from airflow.settings import STORE_DAG_CODE, STORE_SERIALIZED_DAGS from airflow.utils import timezone from airflow.utils.helpers import reap_process_group from airflow.utils.db import provide_session @@ -948,16 +947,6 @@ def _refresh_dag_dir(self): except Exception: self.log.exception("Error removing old import errors") - if STORE_SERIALIZED_DAGS: - from airflow.models.serialized_dag import SerializedDagModel - from airflow.models.dag import DagModel - SerializedDagModel.remove_deleted_dags(self._file_paths) - DagModel.deactivate_deleted_dags(self._file_paths) - - if STORE_DAG_CODE: - from airflow.models.dagcode import DagCode - DagCode.remove_deleted_code(self._file_paths) - def _print_stat(self): """ Occasionally print out stats about how fast the files are getting processed