class Chewy::Strategy::LazySidekiq::IndicesUpdateWorker

Public Instance Methods

perform(models) click to toggle source
# 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

Private Instance Methods

strategy() click to toggle source
# File lib/chewy/strategy/lazy_sidekiq.rb, line 27
def strategy
  Chewy.disable_refresh_async ? :atomic_no_refresh : :atomic
end