Skip to content

Commit

Permalink
Fix unnecessary condition causing seqscan when indexing (mastodon#26689)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and vmstan committed Jan 5, 2024
1 parent a35363f commit 40c87f2
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 40c87f2

Please sign in to comment.