Sha256: abc0309d2ce4eda9fe62da6c8f112b2c17b79af30ffe358e2a41ca64a434b370
Contents?: true
Size: 920 Bytes
Versions: 8
Compression:
Stored size: 920 Bytes
Contents
begin require 'airbrake' rescue LoadError raise "Can't find 'airbrake' gem. Please add it to your Gemfile or install it." end module Resque module Failure class Airbrake < Base def self.configure(&block) Resque.logger.warn "This actually sets global Airbrake configuration, " \ "which is probably not what you want. This will be gone in 2.0." Resque::Failure.backend = self ::Airbrake.configure(&block) end def self.count(queue = nil, class_name = nil) # We can't get the total # of errors from Airbrake so we fake it # by asking Resque how many errors it has seen. Stat[:failed] end def save ::Airbrake.notify(exception, :parameters => { :payload_class => payload['class'].to_s, :payload_args => payload['args'].inspect } ) end end end end
Version data entries
8 entries across 8 versions & 4 rubygems