Sha256: 91e5ee0263b1699509511da468b9c03fe6980c4dd6b2460bd150e387264f4dc9
Contents?: true
Size: 397 Bytes
Versions: 1
Compression:
Stored size: 397 Bytes
Contents
module Sidekiq::QueueMetrics class JobDeathMiddleware def call(worker, msg, queue) call_dead_monitor(msg) if is_dead_job?(msg) yield if block_given? end def is_dead_job?(msg) msg.key?('retry_count') && msg['retry_count'] == 0 end def call_dead_monitor(msg) Sidekiq::QueueMetrics::JobDeathMonitor.proc.call(msg, msg['error_class']) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sidekiq_queue_metrics-3.0.0 | lib/sidekiq_queue_metrics/job_death_middleware.rb |