You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/10/16 13:44:13 UTC

[GitHub] [airflow] ashb commented on a change in pull request #6342: [AIRFLOW-5662] fix incorrect naming for scheduler used slot metric

ashb commented on a change in pull request #6342: [AIRFLOW-5662] fix incorrect naming for scheduler used slot metric
URL: https://github.com/apache/airflow/pull/6342#discussion_r335483337
 
 

 ##########
 File path: airflow/models/pool.py
 ##########
 @@ -107,3 +109,33 @@ def open_slots(self, session):
         Returns the number of slots open at the moment
         """
         return self.slots - self.occupied_slots(session)
+
+    @provide_session
+    def slots_stats(self, session) -> Dict:
+        from airflow.models.taskinstance import TaskInstance  # Avoid circular import
+
+        states_filter = STATES_TO_COUNT_AS_RUNNING | frozenset([State.RUNNING, State.QUEUED])
 
 Review comment:
   Aren't running and queued already in that?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services