Class: Resque::Failure::Coalmine

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object



4
5
6
# File 'lib/resque/failure/coalmine.rb', line 4

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

.countObject



8
9
10
11
12
# File 'lib/resque/failure/coalmine.rb', line 8

def self.count
  # We can't get the total # of errors from Coalmine so we fake it
   # by asking Resque how many errors it has seen.
  Stat[:failed]
end

Instance Method Details

#saveObject



14
15
16
17
18
# File 'lib/resque/failure/coalmine.rb', line 14

def save
  ::Coalmine.custom_variables[:payload_class] = payload['class']
  ::Coalmine.custom_variables[:payload_args]  = payload['args'].inspect
  ::Coalmine.notify(exception)
end