ashb commented on a change in pull request #20795:
URL: https://github.com/apache/airflow/pull/20795#discussion_r781581643



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1140,9 +1140,9 @@ def _send_sla_callbacks_to_processor(self, dag: DAG):
     def _emit_pool_metrics(self, session: Session = None) -> None:
         pools = models.Pool.slots_stats(session=session)
         for pool_name, slot_stats in pools.items():
-            Stats.gauge(f'pool.open_slots.{pool_name}', 
slot_stats[PoolSlotState.OPEN.value])
-            Stats.gauge(f'pool.queued_slots.{pool_name}', 
slot_stats[PoolSlotState.QUEUED.value])
-            Stats.gauge(f'pool.running_slots.{pool_name}', 
slot_stats[PoolSlotState.RUNNING.value])
+            Stats.gauge(f'pool.open_slots.{pool_name}', slot_stats["open"])

Review comment:
       Mypy complained about this as `slot_stats` is a TypedDict, so I removed 
this and deleted the PoolSlotState, as this is the _only_ place this class is 
used.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to