Sha256: e730a0c75ae26d479f1ab6904079115c94f09171dd1789ac58b9a139c01acc73
Contents?: true
Size: 585 Bytes
Versions: 11
Compression:
Stored size: 585 Bytes
Contents
module Sidekiq module Middleware module Server class FailureJobs def call(*args) yield rescue => e data = { :failed_at => Time.now.strftime("%Y/%m/%d %H:%M:%S %Z"), :payload => args[1], :exception => e.class.to_s, :error => e.to_s, :backtrace => e.backtrace, :worker => args[1]['class'], :queue => args[2] } Sidekiq.redis {|conn| conn.rpush(:failed, MultiJson.encode(data)) } raise end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems