mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 10:01:11 +08:00
Merge pull request #5261 from xrav3nz/fix-rebake-match-rake
FIX: `post:rebake_match` rake task
This commit is contained in:
@ -58,10 +58,12 @@ task 'posts:rebake_match', [:pattern, :type, :delay] => [:environment] do |_, ar
|
||||
exit 1
|
||||
end
|
||||
|
||||
search = Post.raw_match(pattern, type)
|
||||
|
||||
rebaked = 0
|
||||
total = search.count
|
||||
|
||||
Post.raw_match(pattern, type).find_each do |post|
|
||||
search.find_each do |post|
|
||||
rebake_post(post)
|
||||
print_status(rebaked += 1, total)
|
||||
sleep(delay) if delay
|
||||
|
Reference in New Issue
Block a user