Sha256: f701befafa93e576064de840531ed72d44c8530ef8208c7626f98aa2287d7438

Contents?: true

Size: 349 Bytes

Versions: 3

Compression:

Stored size: 349 Bytes

Contents

require_relative 'monitor'

module Sidekiq::QueueMetrics
  class JobDeathMonitor < Monitor
    def self.proc
      Proc.new do |job, exception|
        JobDeathMonitor.new.monitor(job)
      end
    end

    def monitor(job)
      super(job['queue'])
      Storage.add_failed_job(job)
    end

    def status_counter
      'failed'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sidekiq_queue_metrics-2.1.1 lib/sidekiq_queue_metrics/monitor/job_death_monitor.rb
sidekiq_queue_metrics-2.1 lib/sidekiq_queue_metrics/monitor/job_death_monitor.rb
sidekiq_queue_metrics-2.0 lib/sidekiq_queue_metrics/monitor/job_death_monitor.rb