ashb commented on a change in pull request #8106: [AIRFLOW-7049] Persistent 
display/filtering of DAG status
URL: https://github.com/apache/airflow/pull/8106#discussion_r404760859
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -313,25 +326,33 @@ def get_int_arg(value, default=0):
                     filename=filename),
                 "error")
 
-        num_of_all_dags = dags_query.count()
+        num_of_all_dags = current_dags.count()
         num_of_pages = int(math.ceil(num_of_all_dags / float(dags_per_page)))
 
+        status_count_all = all_dags.count()
+        status_count_active = active_dags.count()
+        status_count_paused = paused_dags.count()
 
 Review comment:
   This does three queries - we could do it with two very easily as `count_all 
== count_active+count_paused`, right?
   
   (We could _attempt_ to do it as one query with `SELECT is_paused, count(*) 
... GROUP BY is_paused` but that may or may not be more efficient in the end)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to