Module: Resque::Plugins::Statsd
- Defined in:
- lib/resque-statsd.rb,
lib/resque/plugins/statsd.rb
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Method Summary collapse
- #after_enqueue_statsd(*args) ⇒ Object
- #after_perform_statsd(*args) ⇒ Object
- #around_perform_statsd(*args) ⇒ Object
- #on_failure_statsd(*args) ⇒ Object
Instance Method Details
#after_enqueue_statsd(*args) ⇒ Object
5 6 7 8 9 |
# File 'lib/resque/plugins/statsd.rb', line 5 def after_enqueue_statsd(*args) $resque_statsd.increment("#{@queue}.enqueued") $resque_statsd.increment("total.enqueued") end |
#after_perform_statsd(*args) ⇒ Object
11 12 13 14 |
# File 'lib/resque/plugins/statsd.rb', line 11 def after_perform_statsd(*args) $resque_statsd.increment("#{@queue}.finished") $resque_statsd.increment("total.finished") end |
#around_perform_statsd(*args) ⇒ Object
21 22 23 24 25 |
# File 'lib/resque/plugins/statsd.rb', line 21 def around_perform_statsd(*args) $resque_statsd.time("#{@queue}.processed") do yield end end |
#on_failure_statsd(*args) ⇒ Object
16 17 18 19 |
# File 'lib/resque/plugins/statsd.rb', line 16 def on_failure_statsd(*args) $resque_statsd.increment("#{@queue}.failed") $resque_statsd.increment("total.failed") end |