Class: SidekiqBatch::OrphanedCallbackReaper

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

Defined Under Namespace

Classes: Result

Class Method Summary collapse

Class Method Details

.callObject

find_each, not a plain each: a genuine backlog — a reaper that has been down, or a burst of batches that died mid-announcement — should not be materialised in one go inside a worker process.



10
11
12
13
14
15
16
# File 'app/models/sidekiq_batch/orphaned_callback_reaper.rb', line 10

def self.call
  results = []

  orphaned.find_each { |batch| results.concat(fire_for(batch)) }

  results
end