Class: Appom::Retry::RetryConfig
- Inherits:
-
Object
- Object
- Appom::Retry::RetryConfig
- Defined in:
- lib/appom/retry.rb
Overview
Configuration class for retry operations
Instance Attribute Summary collapse
-
#backoff_multiplier ⇒ Object
Returns the value of attribute backoff_multiplier.
-
#base_delay ⇒ Object
Returns the value of attribute base_delay.
-
#max_attempts ⇒ Object
Returns the value of attribute max_attempts.
-
#max_delay ⇒ Object
Returns the value of attribute max_delay.
-
#on_retry ⇒ Object
Returns the value of attribute on_retry.
-
#retry_if ⇒ Object
Returns the value of attribute retry_if.
-
#retry_on_exceptions ⇒ Object
Returns the value of attribute retry_on_exceptions.
Instance Method Summary collapse
-
#initialize ⇒ RetryConfig
constructor
A new instance of RetryConfig.
Constructor Details
#initialize ⇒ RetryConfig
Returns a new instance of RetryConfig.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/appom/retry.rb', line 16 def initialize @max_attempts = DEFAULT_RETRY_COUNT @base_delay = DEFAULT_RETRY_DELAY @backoff_multiplier = DEFAULT_BACKOFF_MULTIPLIER @max_delay = 30 # seconds @retry_on_exceptions = [Appom::ElementNotFoundError, Appom::ElementStateError, Appom::WaitError, StandardError,] @retry_if = nil @on_retry = nil end |
Instance Attribute Details
#backoff_multiplier ⇒ Object
Returns the value of attribute backoff_multiplier.
13 14 15 |
# File 'lib/appom/retry.rb', line 13 def backoff_multiplier @backoff_multiplier end |
#base_delay ⇒ Object
Returns the value of attribute base_delay.
13 14 15 |
# File 'lib/appom/retry.rb', line 13 def base_delay @base_delay end |
#max_attempts ⇒ Object
Returns the value of attribute max_attempts.
13 14 15 |
# File 'lib/appom/retry.rb', line 13 def max_attempts @max_attempts end |
#max_delay ⇒ Object
Returns the value of attribute max_delay.
13 14 15 |
# File 'lib/appom/retry.rb', line 13 def max_delay @max_delay end |
#on_retry ⇒ Object
Returns the value of attribute on_retry.
13 14 15 |
# File 'lib/appom/retry.rb', line 13 def on_retry @on_retry end |
#retry_if ⇒ Object
Returns the value of attribute retry_if.
13 14 15 |
# File 'lib/appom/retry.rb', line 13 def retry_if @retry_if end |
#retry_on_exceptions ⇒ Object
Returns the value of attribute retry_on_exceptions.
13 14 15 |
# File 'lib/appom/retry.rb', line 13 def retry_on_exceptions @retry_on_exceptions end |