Class: Chewy::Strategy::ActiveJob::Worker

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/chewy/strategy/active_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(type, ids, options = {}) ⇒ Object



16
17
18
19
# File 'lib/chewy/strategy/active_job.rb', line 16

def perform(type, ids, options = {})
  options[:refresh] = !Chewy.disable_refresh_async if Chewy.disable_refresh_async
  type.constantize.import!(ids, **options)
end