Method: Chewy::Strategy::LazySidekiq#initialize
- Defined in:
- lib/chewy/strategy/lazy_sidekiq.rb
#initialize ⇒ LazySidekiq
Returns a new instance of LazySidekiq.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/chewy/strategy/lazy_sidekiq.rb', line 32 def initialize # Use parent's @stash to store destroyed records, since callbacks for them have to # be run immediately on the strategy block end because we won't be able to fetch # records further in IndicesUpdateWorker. This will be done by avoiding of # LazySidekiq#update_chewy_indices call and calling LazySidekiq#update instead. super # @lazy_stash is used to store all the lazy evaluated callbacks with call of # strategy's #update_chewy_indices. @lazy_stash = {} end |