Class: Chewy::Strategy::ActiveJob
- Inherits:
-
Atomic
show all
- Defined in:
- lib/chewy/strategy/active_job.rb
Overview
The strategy works the same way as atomic, but performs async index update driven by active_job
Chewy.strategy(:active_job) do
User.all.map(&:save) Post.all.map(&:save) end
Defined Under Namespace
Classes: Worker
Instance Method Summary
collapse
Methods inherited from Atomic
#initialize, #update
Methods inherited from Base
#name, #update
Instance Method Details
21
22
23
24
25
|
# File 'lib/chewy/strategy/active_job.rb', line 21
def leave
@stash.each do |type, ids|
Chewy::Strategy::ActiveJob::Worker.perform_later(type.name, ids) unless ids.empty?
end
end
|