Class: Resque::Failure::Honeybadger

Inherits:
Base
  • Object
show all
Defined in:
lib/resque/failure/honeybadger.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object



7
8
9
# File 'lib/resque/failure/honeybadger.rb', line 7

def self.configure(&block)
  ::Honeybadger.configure(&block)
end

Instance Method Details

#countObject



11
12
13
14
15
# File 'lib/resque/failure/honeybadger.rb', line 11

def count
  # We don't want to ask Honeybadger for the total # of errors,
  # so we fake it by asking Resque instead.
  Stat[:failed]
end

#saveObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/resque/failure/honeybadger.rb', line 17

def save
  flush_if_v2 do
    ::Honeybadger.notify_or_ignore(exception,
      :parameters => {
        :payload_class => payload['class'].to_s,
        :payload_args => payload['args'].inspect
      }
    )
  end
end