mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 02:02:48 +08:00
FEATURE: allow UploadRecovery to be run on a single post (#8094)
This commit is contained in:
parent
35b1185a08
commit
dbe0111822
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user