Commit 81f73ff7f97c9fbb876932bd2a54f770bf09721b

Authored by Andrew
1 parent 38880598

Call out to ActiveSupport for notications [skip ci]

Showing 1 changed file with 6 additions and 1 deletions   Show diff stats
lib/searchkick/bulk_indexer.rb
@@ -63,7 +63,12 @@ module Searchkick @@ -63,7 +63,12 @@ module Searchkick
63 records = records.select(&:should_index?) 63 records = records.select(&:should_index?)
64 if records.any? 64 if records.any?
65 with_retries do 65 with_retries do
66 - method_name ? bulk_update(records, method_name) : bulk_index(records) 66 + # call out to index for ActiveSupport notifications
  67 + if method_name
  68 + index.bulk_update(records, method_name)
  69 + else
  70 + index.bulk_index(records)
  71 + end
67 end 72 end
68 end 73 end
69 end 74 end