Class: Bugsnag::Resque
- Inherits:
-
Resque::Failure::Base
- Object
- Resque::Failure::Base
- Bugsnag::Resque
- Defined in:
- lib/bugsnag/resque.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.add_failure_backend ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/bugsnag/resque.rb', line 11 def self.add_failure_backend return if ::Resque::Failure.backend == self # Ensure resque is using a "Multiple" failure backend unless ::Resque::Failure.backend < ::Resque::Failure::Multiple original_backend = ::Resque::Failure.backend ::Resque::Failure.backend = ::Resque::Failure::Multiple ::Resque::Failure.backend.classes ||= [] ::Resque::Failure.backend.classes << original_backend end # Add Bugsnag failure backend unless ::Resque::Failure.backend.classes.include?(self) ::Resque::Failure.backend.classes << self end end |
Instance Method Details
#save ⇒ Object
28 29 30 |
# File 'lib/bugsnag/resque.rb', line 28 def save Bugsnag.auto_notify(exception, {:context => "resque##{queue}", :payload => payload, :delivery_method => :synchronous}) end |