Commit b993a4ebde8d4171f8a9be314cc90fb78e8520be
1 parent
8b445ba2
Exists in
master
and in
1 other branch
Updated example [skip ci]
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
README.md
... | ... | @@ -1638,10 +1638,8 @@ class ReindexConversionsJob < ApplicationJob |
1638 | 1638 | recently_converted_ids.in_groups_of(1000, false) do |ids| |
1639 | 1639 | # fetch conversions |
1640 | 1640 | conversions = Searchjoy::Search |
1641 | - .where(convertable_id: ids, convertable_type: class_name) | |
1642 | - .where.not(user_id: nil) | |
1643 | - .group(:convertable_id, :query) | |
1644 | - .distinct.count(:user_id) | |
1641 | + .where(convertable_id: ids, convertable_type: class_name).where.not(user_id: nil) | |
1642 | + .group(:convertable_id, :query).distinct.count(:user_id) | |
1645 | 1643 | |
1646 | 1644 | # group conversions by record |
1647 | 1645 | conversions_by_record = {} | ... | ... |