Fix “Scoped order is ignored, it's forced to be batch order.” warnings (#26793)
This commit is contained in:
@@ -27,6 +27,6 @@ class Importer::PublicStatusesIndexImporter < Importer::BaseImporter
|
||||
end
|
||||
|
||||
def scope
|
||||
Status.indexable
|
||||
Status.indexable.reorder(nil)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,7 +11,7 @@ class Importer::StatusesIndexImporter < Importer::BaseImporter
|
||||
# from a different scope to avoid indexing them multiple times, but that
|
||||
# could end up being a very large array
|
||||
|
||||
scope.find_in_batches(batch_size: @batch_size) do |tmp|
|
||||
scope.reorder(nil).find_in_batches(batch_size: @batch_size) do |tmp|
|
||||
in_work_unit(tmp.map(&:status_id)) do |status_ids|
|
||||
deleted = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user