Class: Soka::Agents::RetryConfig
- Inherits:
-
Object
- Object
- Soka::Agents::RetryConfig
- Defined in:
- lib/soka/agents/dsl_methods.rb
Overview
Configuration for retry behavior
Instance Attribute Summary collapse
-
#backoff_strategy ⇒ Object
Returns the value of attribute backoff_strategy.
-
#max_retries ⇒ Object
Returns the value of attribute max_retries.
-
#retry_on ⇒ Object
Returns the value of attribute retry_on.
Instance Method Summary collapse
-
#initialize ⇒ RetryConfig
constructor
A new instance of RetryConfig.
-
#to_h ⇒ Hash
Convert to hash.
Constructor Details
#initialize ⇒ RetryConfig
Returns a new instance of RetryConfig.
134 135 136 137 138 |
# File 'lib/soka/agents/dsl_methods.rb', line 134 def initialize @max_retries = 3 @backoff_strategy = :exponential @retry_on = [] end |
Instance Attribute Details
#backoff_strategy ⇒ Object
Returns the value of attribute backoff_strategy.
132 133 134 |
# File 'lib/soka/agents/dsl_methods.rb', line 132 def backoff_strategy @backoff_strategy end |
#max_retries ⇒ Object
Returns the value of attribute max_retries.
132 133 134 |
# File 'lib/soka/agents/dsl_methods.rb', line 132 def max_retries @max_retries end |
#retry_on ⇒ Object
Returns the value of attribute retry_on.
132 133 134 |
# File 'lib/soka/agents/dsl_methods.rb', line 132 def retry_on @retry_on end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash
142 143 144 145 146 147 148 |
# File 'lib/soka/agents/dsl_methods.rb', line 142 def to_h { max_retries: max_retries, backoff_strategy: backoff_strategy, retry_on: retry_on } end |