Class: Metrician::Resque
- Defined in:
- lib/metrician/reporters/resque.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Reporter
Class Method Details
.enabled? ⇒ Boolean
4 5 6 7 |
# File 'lib/metrician/reporters/resque.rb', line 4 def self.enabled? !!defined?(::Resque) && Metrician::Jobs.enabled? end |
Instance Method Details
#instrument ⇒ Object
9 10 11 12 13 14 |
# File 'lib/metrician/reporters/resque.rb', line 9 def instrument require "metrician/jobs/resque_plugin" unless ::Resque::Job.method_defined?(:payload_class_with_metrician) ::Resque::Job.send(:include, Metrician::Jobs::ResquePlugin::Installer) end end |