Commit cc1e9786dcf6be21edbc672f13286ef741399ee2

Authored by Andrew Kane
1 parent 26e543be

Use batch size for ProcessQueueJob [skip ci]

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/searchkick/process_queue_job.rb
... ... @@ -5,7 +5,7 @@ module Searchkick
5 5 def perform(class_name:)
6 6 model = class_name.constantize
7 7  
8   - limit = 1000
  8 + limit = model.searchkick_index.options[:batch_size] || 1000
9 9 record_ids = Searchkick::ReindexQueue.new(model.searchkick_index.name).reserve(limit: limit)
10 10 if record_ids.any?
11 11 Searchkick::ProcessBatchJob.perform_later(
... ...