From 3d11495d4d532eaa56c78bc5c9f4abd88d2f5a8f Mon Sep 17 00:00:00 2001 From: Radu Date: Thu, 19 Dec 2024 13:19:59 +0100 Subject: [PATCH] use dag_folder for stats --- airflow/models/dagbag.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/models/dagbag.py b/airflow/models/dagbag.py index 03e416c2478b8..ebb810529f9ee 100644 --- a/airflow/models/dagbag.py +++ b/airflow/models/dagbag.py @@ -580,7 +580,7 @@ def collect_dags( file_parse_end_dttm = timezone.utcnow() stats.append( FileLoadStat( - file=filepath.replace(settings.DAGS_FOLDER, ""), + file=filepath.replace(str(dag_folder), ""), duration=file_parse_end_dttm - file_parse_start_dttm, dag_num=len(found_dags), task_num=sum(len(dag.tasks) for dag in found_dags),