ignore md5 dups in upload error checker

This commit is contained in:
Albert Yi
2018-10-25 14:06:44 -07:00
parent 5a13d06501
commit 04c741739d

View File

@@ -4,7 +4,7 @@ require 'mail'
class UploadErrorChecker
def check!
uploads = Upload.where("status like 'error%' and status not like 'error: Upload::Error - Post with MD5%' and status not like 'error: RuntimeError - duplicate%' and status not like 'error: ActiveRecord::RecordInvalid - Validation failed: Md5 has already been taken' and created_at >= ?", 1.hour.ago)
uploads = Upload.where("status like 'error%' and status not like 'error: Upload::Error - Post with MD5%' and status not like 'error: ActiveRecord::RecordInvalid - Validation failed: Md5 duplicate%' and created_at >= ?", 1.hour.ago)
if uploads.size > 5
mail = Mail.new do
from Danbooru.config.contact_email