Class: RightAws::RightAwsBase
- Inherits:
-
Object
- Object
- RightAws::RightAwsBase
- Defined in:
- lib/awsbase/right_awsbase.rb
Direct Known Subclasses
AcfInterface, AcwInterface, AsInterface, Ec2, ElbInterface, EmrInterface, IamInterface, RdsInterface, Route53Interface, S3Interface, SdbInterface, SnsInterface, SqsGen2Interface, SqsInterface
Constant Summary collapse
- AMAZON_PROBLEMS =
Text, if found in an error message returned by AWS, indicates that this may be a transient error. Transient errors are automatically retried with exponential back-off.
[ 'internal service error', 'is currently unavailable', 'no response from', 'Please try again', 'InternalError', 'Internal Server Error', 'ServiceUnavailable', #from SQS docs 'Unavailable', 'This application is not currently available', 'InsufficientInstanceCapacity' ]
- RAISE_ON_TIMEOUT_ON_ACTIONS =
Raise an exception if a timeout occures while an API call is in progress. This helps to avoid a duplicate resources creation when Amazon hangs for some time and RightHttpConnection is forced to use retries to get a response from it.
If an API call action is in the list then no attempts to retry are performed.
%w{ AllocateAddress CreateSnapshot CreateVolume PurchaseReservedInstancesOffering RequestSpotInstances RunInstances }
- @@amazon_problems =
AMAZON_PROBLEMS
- @@raise_on_timeout_on_actions =
RAISE_ON_TIMEOUT_ON_ACTIONS.dup
Class Method Summary collapse
-
.amazon_problems ⇒ Object
Returns a list of Amazon service responses which are known to be transient problems.
-
.amazon_problems=(problems_list) ⇒ Object
Sets the list of Amazon side problems.
- .raise_on_timeout_on_actions ⇒ Object
- .raise_on_timeout_on_actions=(actions_list) ⇒ Object
Class Method Details
.amazon_problems ⇒ Object
Returns a list of Amazon service responses which are known to be transient problems. We have to re-request if we get any of them, because the problem will probably disappear. By default this method returns the same value as the AMAZON_PROBLEMS const.
211 212 213 |
# File 'lib/awsbase/right_awsbase.rb', line 211 def self.amazon_problems @@amazon_problems end |
.amazon_problems=(problems_list) ⇒ Object
Sets the list of Amazon side problems. Use in conjunction with the getter to append problems.
217 218 219 |
# File 'lib/awsbase/right_awsbase.rb', line 217 def self.amazon_problems=(problems_list) @@amazon_problems = problems_list end |
.raise_on_timeout_on_actions ⇒ Object
237 238 239 |
# File 'lib/awsbase/right_awsbase.rb', line 237 def self.raise_on_timeout_on_actions @@raise_on_timeout_on_actions end |
.raise_on_timeout_on_actions=(actions_list) ⇒ Object
241 242 243 |
# File 'lib/awsbase/right_awsbase.rb', line 241 def self.raise_on_timeout_on_actions=(actions_list) @@raise_on_timeout_on_actions = actions_list end |