mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: find_each
uses find_in_batches
which uses the primary key as the order.
This commit is contained in:
parent
0b965e02b1
commit
5da768b4fe
1 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ task 'posts:fix_letter_avatars' => :environment do
|
|||
rebaked = 0
|
||||
total = search.count
|
||||
|
||||
search.order(updated_at: :asc).find_each do |post|
|
||||
search.find_each do |post|
|
||||
rebake_post(post)
|
||||
print_status(rebaked += 1, total)
|
||||
end
|
||||
|
@ -48,7 +48,7 @@ task 'posts:rebake_match', [:pattern, :type] => [:environment] do |_,args|
|
|||
rebaked = 0
|
||||
total = search.count
|
||||
|
||||
search.order(updated_at: :asc).find_each do |post|
|
||||
search.find_each do |post|
|
||||
rebake_post(post)
|
||||
print_status(rebaked += 1, total)
|
||||
end
|
||||
|
@ -71,7 +71,7 @@ def rebake_posts(opts = {})
|
|||
total = Post.count
|
||||
rebaked = 0
|
||||
|
||||
Post.order(updated_at: :asc).find_each do |post|
|
||||
Post.find_each do |post|
|
||||
rebake_post(post, opts)
|
||||
print_status(rebaked += 1, total)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue