diff --git a/airflow-core/src/airflow/dag_processing/manager.py b/airflow-core/src/airflow/dag_processing/manager.py index a07cb402ae4eb..9998f3fcc89ae 100644 --- a/airflow-core/src/airflow/dag_processing/manager.py +++ b/airflow-core/src/airflow/dag_processing/manager.py @@ -679,7 +679,7 @@ def _log_file_processing_stats(self, known_files: dict[str, set[DagFileInfo]]): rows = [] utcnow = timezone.utcnow() - now = time.time() + now = time.monotonic() for files in known_files.values(): for file in files: @@ -806,7 +806,7 @@ def _collect_results(self, session: Session = NEW_SESSION): # Collect the DAGS and import errors into the DB, emit metrics etc. self._file_stats[file] = process_parse_results( - run_duration=time.time() - proc.start_time, + run_duration=time.monotonic() - proc.start_time, finish_time=timezone.utcnow(), run_count=self._file_stats[file].run_count, bundle_name=file.bundle_name,