Class: SidekiqBatch::JidIndex

Inherits:
Object
  • Object
show all
Defined in:
app/models/sidekiq_batch/jid_index.rb

Constant Summary collapse

SORTED_SETS =

The dead set is deliberately absent: a job in it will never run again, so counting it as live only hides rows that need reaping. It is what made "Kill All" on the Retries page stall a batch permanently — that button moves jobs to the dead set with notify_failure: false, so no death handler runs and nothing marks the rows failed. A reaper that read the dead set as live then skipped them on every run until Redis expired them, six months later by default.

[::Sidekiq::RetrySet, ::Sidekiq::ScheduledSet].freeze

Class Method Summary collapse

Class Method Details

.callObject



17
18
19
20
21
22
23
24
25
# File 'app/models/sidekiq_batch/jid_index.rb', line 17

def self.call
  jids = Set.new

  add_queued(jids)
  add_sorted_sets(jids)
  add_executing(jids)

  jids
end