Class: Temporalio::RetryPolicy
- Inherits:
-
Data
- Object
- Data
- Temporalio::RetryPolicy
- Defined in:
- lib/temporalio/retry_policy.rb,
lib/temporalio/retry_policy.rb
Overview
Options for retrying workflows and activities.
Instance Attribute Summary collapse
-
#backoff_coefficient ⇒ Float
Coefficient to multiply previous backoff interval by to get new interval.
-
#initial_interval ⇒ Float
Backoff interval in seconds for the first retry.
-
#max_attempts ⇒ Integer
Maximum number of attempts.
-
#max_interval ⇒ Float?
Maximum backoff interval in seconds between retries.
-
#non_retryable_error_types ⇒ Array<String>?
List of error types that are not retryable.
Instance Method Summary collapse
-
#initialize(initial_interval: 1.0, backoff_coefficient: 2.0, max_interval: nil, max_attempts: 0, non_retryable_error_types: nil) ⇒ RetryPolicy
constructor
Create retry policy.
Constructor Details
#initialize(initial_interval: 1.0, backoff_coefficient: 2.0, max_interval: nil, max_attempts: 0, non_retryable_error_types: nil) ⇒ RetryPolicy
Create retry policy.
47 48 49 50 51 52 53 54 55 |
# File 'lib/temporalio/retry_policy.rb', line 47 def initialize( initial_interval: 1.0, backoff_coefficient: 2.0, max_interval: nil, max_attempts: 0, non_retryable_error_types: nil ) super end |
Instance Attribute Details
#backoff_coefficient ⇒ Float
Returns Coefficient to multiply previous backoff interval by to get new interval. Default 2.0.
26 27 28 |
# File 'lib/temporalio/retry_policy.rb', line 26 def backoff_coefficient @backoff_coefficient end |
#initial_interval ⇒ Float
Returns Backoff interval in seconds for the first retry. Default 1.0.
26 27 28 |
# File 'lib/temporalio/retry_policy.rb', line 26 def initial_interval @initial_interval end |
#max_attempts ⇒ Integer
Returns Maximum number of attempts. If ‘0`, the default, there is no maximum.
26 27 28 |
# File 'lib/temporalio/retry_policy.rb', line 26 def max_attempts @max_attempts end |
#max_interval ⇒ Float?
Returns Maximum backoff interval in seconds between retries. Default 100x ‘initial_interval`.
26 27 28 |
# File 'lib/temporalio/retry_policy.rb', line 26 def max_interval @max_interval end |
#non_retryable_error_types ⇒ Array<String>?
Returns List of error types that are not retryable.
26 27 28 |
# File 'lib/temporalio/retry_policy.rb', line 26 def non_retryable_error_types @non_retryable_error_types end |