From b50b9d237d72f9ce22df4050c457663896b78534 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 7 Aug 2011 20:43:42 -0400 Subject: [PATCH] allow broken image resubmits after 1hr --- app/models/swf_asset.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/swf_asset.rb b/app/models/swf_asset.rb index 9fda5106..bc4097f5 100644 --- a/app/models/swf_asset.rb +++ b/app/models/swf_asset.rb @@ -109,8 +109,11 @@ class SwfAsset < ActiveRecord::Base !has_image? || image_pending_repair? end + REPAIR_PENDING_EXPIRES = 1.hour def image_pending_repair? - reported_broken_at && (converted_at.nil? || reported_broken_at > converted_at) + reported_broken_at && + (converted_at.nil? || reported_broken_at > converted_at) && + reported_broken_at > REPAIR_PENDING_EXPIRES.ago end attr_accessor :item