This is an automated email from the ASF dual-hosted git repository.
taragolis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new ac6a637326 fix: sort dag processing stats by last_runtime (#37302)
ac6a637326 is described below
commit ac6a6373266cb84125cb16051cddf06845bfd4c2
Author: Narendra-Neerukonda <[email protected]>
AuthorDate: Wed Feb 21 18:31:07 2024 +0530
fix: sort dag processing stats by last_runtime (#37302)
* fix: sort dag processing stats by last_runtime
* Update airflow/dag_processing/manager.py
Co-authored-by: Andrey Anshin <[email protected]>
---------
Co-authored-by: Jarek Potiuk <[email protected]>
Co-authored-by: Andrey Anshin <[email protected]>
---
airflow/dag_processing/manager.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow/dag_processing/manager.py
b/airflow/dag_processing/manager.py
index e1fa7a43bd..76845d1790 100644
--- a/airflow/dag_processing/manager.py
+++ b/airflow/dag_processing/manager.py
@@ -849,7 +849,7 @@ class DagFileProcessorManager(LoggingMixin):
rows.append((file_path, processor_pid, runtime, num_dags,
num_errors, last_runtime, last_run))
# Sort by longest last runtime. (Can't sort None values in python3)
- rows.sort(key=lambda x: x[3] or 0.0)
+ rows.sort(key=lambda x: x[5] or 0.0, reverse=True)
formatted_rows = []
for file_path, pid, runtime, num_dags, num_errors, last_runtime,
last_run in rows: