Sha256: 2b05ec633c3970e18ce2d13bac0d96296a7d79a2d8632c0f3ea648c20cfdefa3
Contents?: true
Size: 829 Bytes
Versions: 9
Compression:
Stored size: 829 Bytes
Contents
require "resque" require "resque/failure/multiple" require "resque/failure/redis" require "resque/failure/multiple" module Hippo class Job class FailureLogger < ::Resque::Failure::Base 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 def save Hippo.logger.error detailed end 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 end end end
Version data entries
9 entries across 9 versions & 1 rubygems