Method: Temporalio::RetryPolicy#initialize

Defined in:
lib/temporalio/retry_policy.rb

#initialize(initial_interval: 1.0, backoff_coefficient: 2.0, max_interval: nil, max_attempts: 0, non_retryable_error_types: nil) ⇒ RetryPolicy

Create retry policy.

Parameters:

  • initial_interval (Float) (defaults to: 1.0)

    Backoff interval in seconds for the first retry. Default 1.0.

  • backoff_coefficient (Float) (defaults to: 2.0)

    Coefficient to multiply previous backoff interval by to get new interval. Default 2.0.

  • max_interval (Float, nil) (defaults to: nil)

    Maximum backoff interval in seconds between retries. Default 100x ‘initial_interval`.

  • max_attempts (Integer) (defaults to: 0)

    Maximum number of attempts. If ‘0`, the default, there is no maximum.

  • non_retryable_error_types (Array<String>, nil) (defaults to: nil)

    List of error types that are not retryable.



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