performance tweaks for rails 4.1

This commit is contained in:
r888888888
2014-04-24 22:18:14 -07:00
parent a89c57cee0
commit aab03422bc
16 changed files with 22 additions and 16 deletions

View File

@@ -4,7 +4,7 @@ require 'mail'
class UploadErrorChecker
def check!
uploads = Upload.where("status like 'error%' and status not like 'error: RuntimeError - duplicate%' 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)
if uploads.size > 5
mail = Mail.new do
from "webmaster@danbooru.donmai.us"