Class: Resque::Failure::Failbot

Inherits:
Base
  • Object
show all
Defined in:
lib/failbot/resque_failure_backend.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.countObject



14
15
16
17
# File 'lib/failbot/resque_failure_backend.rb', line 14

def self.count
  # Fake it for now.
  Stat[:failed]
end

.urlObject



6
7
8
9
10
11
12
# File 'lib/failbot/resque_failure_backend.rb', line 6

def self.url
  if ENV['RAILS_ENV'] == 'staging'
    "http://haystack-staging.githubapp.com/types/exception"
  else
    "http://haystack.githubapp.com/types/exception"
  end
end

Instance Method Details

#saveObject



19
20
21
22
23
24
25
# File 'lib/failbot/resque_failure_backend.rb', line 19

def save
  ::Failbot.report(exception,
    :worker => worker.to_s,
    :queue  => queue.to_s,
    :job    => payload['class'].to_s,
    :args   => payload['args'].inspect)
end