Class: QueuePulse::Checks::QueueDepth
- Defined in:
- lib/queue_pulse/checks/queue_depth.rb
Overview
Alerts when a queue's ready depth exceeds queue_depth_threshold. Cooldown is per-queue. (Requirements US-3.2, US-3.3.)
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from QueuePulse::Checks::Base
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/queue_pulse/checks/queue_depth.rb', line 8 def call threshold = config.queue_depth_threshold source.queue_stats.filter_map do |stat| next if stat.depth < threshold with_cooldown("queue_depth:#{stat.queue_name}") do depth_alert(stat) end end end |