FEATURE: allow UploadRecovery to be run on a single post (#8094)

This commit is contained in:
Michael Brown 2019-10-02 00:57:36 -04:00 committed by Sam
parent 35b1185a08
commit dbe0111822

View File

@ -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