Commit 96d423ad4ba8dc58543d86ca0f61a3504f43cae4
1 parent
dbeee3a6
Exists in
master
and in
19 other branches
Get unique record ids for conversions in readme example [skip ci]
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
README.md
... | ... | @@ -1185,7 +1185,7 @@ class ReindexConversionsJob < ActiveJob::Base |
1185 | 1185 | def perform(class_name) |
1186 | 1186 | recently_converted_ids = |
1187 | 1187 | Searchjoy::Search.where("convertable_type = ? AND converted_at > ?", class_name, 1.day.ago) |
1188 | - .pluck(:convertable_id).sort | |
1188 | + .order(:convertable_id).uniq.pluck(:convertable_id) | |
1189 | 1189 | |
1190 | 1190 | recently_converted_ids.in_groups_of(1000, false) do |ids| |
1191 | 1191 | # fetch conversions and group by record | ... | ... |