Class: Chewy::Strategy::LazySidekiq::IndicesUpdateWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
lib/chewy/strategy/lazy_sidekiq.rb

Instance Method Summary collapse

Instance Method Details

#perform(models) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/chewy/strategy/lazy_sidekiq.rb', line 17

def perform(models)
  Chewy.strategy(strategy) do
    models.each do |model_type, model_ids|
      model_type.constantize.where(id: model_ids).each(&:run_chewy_callbacks)
    end
  end
end