mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 22:14:43 +08:00
FEATURE: allow UploadRecovery to be run on a single post (#8094)
This commit is contained in:
@ -7,8 +7,10 @@ class UploadRecovery
|
||||
end
|
||||
|
||||
def recover(posts = Post)
|
||||
posts.have_uploads.find_each do |post|
|
||||
posts.have_uploads.find_each { |post| recover_post post }
|
||||
end
|
||||
|
||||
def recover_post(post)
|
||||
begin
|
||||
analyzer = PostAnalyzer.new(post.raw, post.topic_id)
|
||||
|
||||
@ -45,7 +47,6 @@ class UploadRecovery
|
||||
puts "#{post.full_url} #{e.class}: #{e.message}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
Reference in New Issue
Block a user