From d8ce46d4d582fb07fa388e6f71eb9d8488bea1ed Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 18 Feb 2017 20:30:57 -0800 Subject: [PATCH] Cleaner queue code [skip ci] --- lib/searchkick/process_queue_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/searchkick/process_queue_job.rb b/lib/searchkick/process_queue_job.rb index 655d987..4f59dad 100644 --- a/lib/searchkick/process_queue_job.rb +++ b/lib/searchkick/process_queue_job.rb @@ -6,7 +6,7 @@ module Searchkick 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, -- libgit2 0.21.0