Created
February 9, 2010 18:07
-
-
Save defunkt/299477 to your computer and use it in GitHub Desktop.
Example Custom Resque Failure Backend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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