lib/searchkick/process_queue_job.rb in searchkick-2.1.1 vs lib/searchkick/process_queue_job.rb in searchkick-2.2.0
- old
+ new
@@ -4,10 +4,10 @@
def perform(class_name:)
model = class_name.constantize
limit = model.searchkick_index.options[:batch_size] || 1000
- record_ids = Searchkick::ReindexQueue.new(model.searchkick_index.name).reserve(limit: limit)
+ record_ids = model.searchkick_index.reindex_queue.reserve(limit: limit)
if record_ids.any?
Searchkick::ProcessBatchJob.perform_later(
class_name: model.name,
record_ids: record_ids
)