Add matching storage manager

This commit is contained in:
Albert Yi
2018-07-05 10:03:40 -07:00
parent 4762de65e1
commit ea210bdc75
4 changed files with 7 additions and 10 deletions

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 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: RuntimeError - duplicate%' and status not like 'error: ActiveRecord::RecordInvalid - Validation failed: Md5 has already been taken' and created_at >= ?", 1.hour.ago)
if uploads.size > 5
mail = Mail.new do
from Danbooru.config.contact_email