Sha256: 6f5e1c83f4b6790aa72b9013ca4b96f4ea73e1b3c7e5f81ac393ab3359f349f4
Contents?: true
Size: 621 Bytes
Versions: 12
Compression:
Stored size: 621 Bytes
Contents
module WatCatcher class SidekiqMiddleware def call(worker, msg, queue) begin yield rescue => excpt raise if thrown_by_watcatcher?(msg) u = nil begin if worker.class == Sidekiq::Extensions::DelayedClass (worker,method_name,args) = YAML.load(msg["args"][0]) end u = worker.wat_user(*msg["args"]) if worker.respond_to? :wat_user rescue; end WatCatcher::Report.new(excpt, user: u, sidekiq: msg) raise end end def thrown_by_watcatcher?(msg) msg["class"] =~ /WatCatcher/ end end end
Version data entries
12 entries across 12 versions & 1 rubygems