Skip to content

Instantly share code, notes, and snippets.

@defunkt
Created February 9, 2010 18:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save defunkt/299477 to your computer and use it in GitHub Desktop.
Save defunkt/299477 to your computer and use it in GitHub Desktop.
Example Custom Resque Failure Backend
module Resque
module Failure
class Failbot < Base
def self.url
"http://haystack/types/exception"
end
def self.count
# Fake it for now.
Stat[:failed]
end
def save
::Failbot.report(exception,
:worker => worker.to_s,
:queue => queue.to_s,
:job => payload['class'].to_s,
:args => payload['args'].inspect)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment