This commit is contained in:
r888888888
2013-05-06 12:54:31 -07:00
parent c33a6e376a
commit 1ce7953730
4 changed files with 62 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ require 'mail'
class UploadErrorChecker
def check!
uploads = Upload.where("status like 'error%' and created_at >= ?", 1.hour.ago).all
uploads = Upload.where("status like 'error%' and status not like 'error: RuntimeError - duplicate%' and created_at >= ?", 1.hour.ago).all
if uploads.size > 5
mail = Mail.new do
from "webmaster@danbooru.donmai.us"