Module: Sidekiq::Ultimate::Resurrector::Count

Defined in:
lib/sidekiq/ultimate/resurrector/count.rb

Overview

Allows to get the count of times the job was resurrected

Class Method Summary collapse

Class Method Details

.read(job_id:) ⇒ Integer

Returns count of times the job was resurrected.

Parameters:

  • job_id (String)

    job id

Returns:

  • (Integer)

    count of times the job was resurrected



13
14
15
16
17
# File 'lib/sidekiq/ultimate/resurrector/count.rb', line 13

def read(job_id:)
  Sidekiq.redis do |redis|
    redis.get("#{CommonConstants::MAIN_KEY}:counter:jid:#{job_id}").to_i
  end
end