allow broken image resubmits after 1hr
This commit is contained in:
parent
c54030f3b3
commit
b50b9d237d
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue