1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Fix unnecessary condition causing seqscan when indexing (#26689)

This commit is contained in:
Eugen Rochko 2023-08-27 22:37:35 +02:00 committed by GitHub
parent f8d2fea2e6
commit 5694e24bbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ module AccountStatusesSearch
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