Class: SunspotOffline::Sidekiq::RemovalWorker
- Inherits:
-
Object
- Object
- SunspotOffline::Sidekiq::RemovalWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/sunspot_offline/sidekiq/removal_worker.rb
Instance Method Summary collapse
Instance Method Details
#perform(model_class, ids) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/sunspot_offline/sidekiq/removal_worker.rb', line 8 def perform(model_class, ids) if ids.present? Sunspot.remove_by_id(model_class, Array(ids)) else Sunspot.remove_all(model_class) end end |