Module: Rack::QueueMetrics::Notify
- Included in:
- AppTime, QueueDepth, QueueTime
- Defined in:
- lib/queue-metrics/notify.rb
Instance Method Summary collapse
Instance Method Details
#notify(data) ⇒ Object
10 11 12 |
# File 'lib/queue-metrics/notify.rb', line 10 def notify(data) ActiveSupport::Notifications.instrument(@instrument_name, data) end |
#should_notify? ⇒ Boolean
4 5 6 7 8 |
# File 'lib/queue-metrics/notify.rb', line 4 def should_notify? if defined?(ActiveSupport::Notifications) ActiveSupport::Notifications.notifier.listening?(@instrument_name) end end |