Class: Appom::Retry::RetryConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/appom/retry.rb

Overview

Configuration class for retry operations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRetryConfig

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_multiplierObject

Returns the value of attribute backoff_multiplier.



13
14
15
# File 'lib/appom/retry.rb', line 13

def backoff_multiplier
  @backoff_multiplier
end

#base_delayObject

Returns the value of attribute base_delay.



13
14
15
# File 'lib/appom/retry.rb', line 13

def base_delay
  @base_delay
end

#max_attemptsObject

Returns the value of attribute max_attempts.



13
14
15
# File 'lib/appom/retry.rb', line 13

def max_attempts
  @max_attempts
end

#max_delayObject

Returns the value of attribute max_delay.



13
14
15
# File 'lib/appom/retry.rb', line 13

def max_delay
  @max_delay
end

#on_retryObject

Returns the value of attribute on_retry.



13
14
15
# File 'lib/appom/retry.rb', line 13

def on_retry
  @on_retry
end

#retry_ifObject

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_exceptionsObject

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