class AWS::Flow::RetryOptions
Retry options used with {GenericClient#retry} and {ActivityClient#exponential_retry}.
Public Class Methods
new(hash={}, use_defaults=false)
click to toggle source
Creates a new {RetryOptions} instance.
@param [Hash] hash The set of default RetryOptions
.
@option hash :is_retryable_function
The function used to test if the activity is retryable.
@option hash :exceptions_to_allow [Integer]
The number of exceptions to allow.
@option hash :maximum_attempts [Integer]
The maximum number of attempts to make before the task is marked as failed.
@option hash :maximum_retry_interval_seconds [Integer]
The maximum retry interval, in seconds.
@option hash :exceptions_to_retry [Array]
The list of exceptions that will cause a retry attempt.
@option hash :exceptions_to_exclude [Array]
The list of exceptions to exclude from retry.
@option hash :jitter_function
The jitter function used to modify the actual retry time.
@option hash :retries_per_exception [Integer]
The number of retries to make per exception.
@option hash :retry_function
The retry function to use.
@param [true, false] use_defaults
If set to `true`, the default options specified will be used as the runtime options.
Calls superclass method
AWS::Flow::Options::new
# File lib/aws/decider/options.rb, line 292 def initialize(hash={}, use_defaults=false) super(hash, use_defaults) end
Public Instance Methods
isRetryable(failure)
click to toggle source
Tests whether this activity can be retried based on the ‘exceptions_to_retry` and `exceptions_to_exclude` options.
@param [Object] failure
The failure type to test.
@return [true, false]
Returns `true` if the activity can be retried; `false` otherwise.
# File lib/aws/decider/options.rb, line 305 def isRetryable(failure) #TODO stuff about checking for a DecisionException, getting cause if so is_retryable = false is_retryable = @exceptions_to_retry.reject {|exception| failure.class <= exception}.empty? if is_retryable is_retryable = @exceptions_to_exclude.select{|exception| failure.class <= exception}.empty? end return is_retryable end