potiuk commented on a change in pull request #20425:
URL: https://github.com/apache/airflow/pull/20425#discussion_r772495529
##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1140,8 +1140,8 @@ 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["open"])
- Stats.gauge(f'pool.queued_slots.{pool_name}',
slot_stats[TaskInstanceState.QUEUED])
- Stats.gauge(f'pool.running_slots.{pool_name}',
slot_stats[TaskInstanceState.RUNNING])
+ Stats.gauge(f'pool.queued_slots.{pool_name}', slot_stats["queued"])
Review comment:
I feel that since we have "open" stated explicitly, this is really
"coincidentally" matching some of the task states - especially that we only
have a small subsets of the states reflected here. I'd rather create a separate
enum for 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]