1
0
Fork 0
forked from OpenNeo/impress

allow broken image resubmits after 1hr

This commit is contained in:
Emi Matchu 2011-08-07 20:43:42 -04:00
parent c54030f3b3
commit b50b9d237d

View file

@ -109,8 +109,11 @@ class SwfAsset < ActiveRecord::Base
!has_image? || image_pending_repair? !has_image? || image_pending_repair?
end end
REPAIR_PENDING_EXPIRES = 1.hour
def image_pending_repair? 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 end
attr_accessor :item attr_accessor :item