Commit f94568d761aa9bc4a459dd4242dea533a60d6a31
1 parent
08feab18
Exists in
master
and in
16 other branches
Cleaner code [skip ci]
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/searchkick/process_queue_job.rb
... | ... | @@ -4,13 +4,13 @@ module Searchkick |
4 | 4 | |
5 | 5 | def perform(class_name:) |
6 | 6 | model = class_name.constantize |
7 | - limit = model.searchkick_index.options[:batch_size] || 1000 | |
7 | + limit = model.searchkick_options[:batch_size] || 1000 | |
8 | 8 | |
9 | 9 | loop do |
10 | 10 | record_ids = model.searchkick_index.reindex_queue.reserve(limit: limit) |
11 | 11 | if record_ids.any? |
12 | 12 | Searchkick::ProcessBatchJob.perform_later( |
13 | - class_name: model.name, | |
13 | + class_name: class_name, | |
14 | 14 | record_ids: record_ids |
15 | 15 | ) |
16 | 16 | # TODO when moving to reliable queuing, mark as complete | ... | ... |