abort on dup md5 preprocessing

This commit is contained in:
Albert Yi
2018-06-13 14:41:51 -07:00
parent b0c2ddba8b
commit a6e972a6e6
2 changed files with 11 additions and 0 deletions

View File

@@ -114,6 +114,10 @@ class Upload < ApplicationRecord
status =~ /duplicate/
end
def is_errored?
status =~ /error:/
end
def duplicate_post_id
@duplicate_post_id ||= status[/duplicate: (\d+)/, 1]
end