Class: Hippo::Job::FailureLogger
- Inherits:
-
Resque::Failure::Base
- Object
- Resque::Failure::Base
- Hippo::Job::FailureLogger
- Defined in:
- lib/hippo/job/failure_logger.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.configure ⇒ Object
10 11 12 13 14 15 |
# File 'lib/hippo/job/failure_logger.rb', line 10 def self.configure Resque::Failure::Multiple.configure do |multi| # Always stores failure in Redis and writes to log multi.classes = Resque::Failure::Redis, self end end |
Instance Method Details
#detailed ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/hippo/job/failure_logger.rb', line 21 def detailed <<-EOF #{worker} failed processing #{queue}: Payload: #{payload.inspect.split("\n").map { |l| " " + l }.join("\n")} Exception: #{exception} #{exception.backtrace.map { |l| " " + l }.join("\n")} EOF end |