Class: AWS::Flow::RetryOptions
- Defined in:
- lib/aws/decider/options.rb
Overview
Retry options used with GenericClient#retry and ActivityClient#exponential_retry.
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Utilities::UpwardLookups
Attributes included from Utilities::UpwardLookups::InstanceMethods
Instance Method Summary collapse
-
#initialize(hash = {}, use_defaults = false) ⇒ RetryOptions
constructor
Creates a new RetryOptions instance.
-
#isRetryable(failure) ⇒ true, false
Tests whether this activity can be retried based on the ‘exceptions_to_retry` and `exceptions_to_exclude` options.
Methods inherited from Options
#get_options, inherited, #method_missing
Methods included from Utilities::UpwardLookups
#held_properties, #properties, #property
Methods included from Utilities::UpwardLookups::InstanceMethods
Constructor Details
#initialize(hash = {}, use_defaults = false) ⇒ RetryOptions
Creates a new AWS::Flow::RetryOptions instance.
292 293 294 |
# File 'lib/aws/decider/options.rb', line 292 def initialize(hash={}, use_defaults=false) super(hash, use_defaults) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AWS::Flow::Options
Instance Method Details
#isRetryable(failure) ⇒ true, false
Tests whether this activity can be retried based on the ‘exceptions_to_retry` and `exceptions_to_exclude` options.
305 306 307 308 309 310 311 312 313 |
# 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 |