lib/bugsnag/integrations/resque.rb in bugsnag-6.6.3 vs lib/bugsnag/integrations/resque.rb in bugsnag-6.6.4
- old
+ new
@@ -6,15 +6,19 @@
FRAMEWORK_ATTRIBUTES = {
:framework => "Resque"
}
+ ##
+ # Callthrough to Bugsnag configuration.
def self.configure(&block)
add_failure_backend
Bugsnag.configure(&block)
end
+ ##
+ # Sets up the Resque failure backend.
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
@@ -28,9 +32,11 @@
unless ::Resque::Failure.backend.classes.include?(self)
::Resque::Failure.backend.classes << self
end
end
+ ##
+ # Notifies Bugsnag of a raised exception.
def save
Bugsnag.notify(exception, true) do |report|
report.severity = "error"
report.severity_reason = {
:type => Bugsnag::Report::UNHANDLED_EXCEPTION_MIDDLEWARE,