Exception: OxTenderAbstract::ArchiveBlockedError
- Inherits:
-
ArchiveError
- Object
- StandardError
- Error
- ArchiveError
- OxTenderAbstract::ArchiveBlockedError
- Defined in:
- lib/oxtenderabstract/errors.rb
Overview
Archive download blocked error (10 minute block)
Instance Attribute Summary collapse
-
#blocked_until ⇒ Object
readonly
Returns the value of attribute blocked_until.
-
#retry_after_seconds ⇒ Object
readonly
Returns the value of attribute retry_after_seconds.
Instance Method Summary collapse
- #can_retry_at ⇒ Object
-
#initialize(message = 'Archive download blocked', retry_after_seconds = 600) ⇒ ArchiveBlockedError
constructor
A new instance of ArchiveBlockedError.
Constructor Details
#initialize(message = 'Archive download blocked', retry_after_seconds = 600) ⇒ ArchiveBlockedError
Returns a new instance of ArchiveBlockedError.
26 27 28 29 30 |
# File 'lib/oxtenderabstract/errors.rb', line 26 def initialize( = 'Archive download blocked', retry_after_seconds = 600) super() @retry_after_seconds = retry_after_seconds @blocked_until = Time.now + retry_after_seconds end |
Instance Attribute Details
#blocked_until ⇒ Object (readonly)
Returns the value of attribute blocked_until.
24 25 26 |
# File 'lib/oxtenderabstract/errors.rb', line 24 def blocked_until @blocked_until end |
#retry_after_seconds ⇒ Object (readonly)
Returns the value of attribute retry_after_seconds.
24 25 26 |
# File 'lib/oxtenderabstract/errors.rb', line 24 def retry_after_seconds @retry_after_seconds end |
Instance Method Details
#can_retry_at ⇒ Object
32 33 34 |
# File 'lib/oxtenderabstract/errors.rb', line 32 def can_retry_at @blocked_until end |