Exception: OxTenderAbstract::ArchiveBlockedError

Inherits:
ArchiveError show all
Defined in:
lib/oxtenderabstract/errors.rb

Overview

Archive download blocked error (10 minute block)

Instance Attribute Summary collapse

Instance Method Summary collapse

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(message = 'Archive download blocked', retry_after_seconds = 600)
  super(message)
  @retry_after_seconds = retry_after_seconds
  @blocked_until = Time.now + retry_after_seconds
end

Instance Attribute Details

#blocked_untilObject (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_secondsObject (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_atObject



32
33
34
# File 'lib/oxtenderabstract/errors.rb', line 32

def can_retry_at
  @blocked_until
end