Skip to content

Commit

Permalink
Fix unnecessary condition causing seqscan when indexing (#26689)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron committed Aug 27, 2023
1 parent f8d2fea commit 5694e24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/concerns/account_statuses_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def enqueue_remove_from_public_statuses_index
def add_to_public_statuses_index!
return unless Chewy.enabled?

statuses.indexable.find_in_batches do |batch|
statuses.without_reblogs.where(visibility: :public).find_in_batches do |batch|
PublicStatusesIndex.import(query: batch)
end
end
Expand Down

0 comments on commit 5694e24

Please sign in to comment.