Class: Temporalio::Client::Connection::RPCRetryOptions
- Inherits:
-
Struct
- Object
- Struct
- Temporalio::Client::Connection::RPCRetryOptions
- Defined in:
- lib/temporalio/client/connection.rb
Overview
Retry options for server calls when retry is enabled (which it is by default on all high-level Temporalio::Client calls). For most users, the default is preferred.
Instance Attribute Summary collapse
-
#initial_interval ⇒ Float
Initial backoff interval, default 0.1.
-
#max_elapsed_time ⇒ Float
Maximum total time, default 10.0.
-
#max_interval ⇒ Float
Maximum backoff interval, default 5.0.
-
#max_retries ⇒ Integer
Maximum number of retries, default 10.
-
#multiplier ⇒ Float
Backoff multiplier, default 1.5.
-
#randomization_factor ⇒ Float
Randomization jitter to add, default 0.2.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ RPCRetryOptions
constructor
A new instance of RPCRetryOptions.
Constructor Details
#initialize(**kwargs) ⇒ RPCRetryOptions
Returns a new instance of RPCRetryOptions.
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/temporalio/client/connection.rb', line 76 def initialize(**kwargs) # @type var kwargs: untyped kwargs[:initial_interval] = 0.1 unless kwargs.key?(:initial_interval) kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor) kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier) kwargs[:max_interval] = 5.0 unless kwargs.key?(:max_interval) kwargs[:max_elapsed_time] = 10.0 unless kwargs.key?(:max_elapsed_time) kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries) super end |
Instance Attribute Details
#initial_interval ⇒ Float
Returns Initial backoff interval, default 0.1.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/temporalio/client/connection.rb', line 67 RPCRetryOptions = Struct.new( :initial_interval, :randomization_factor, :multiplier, :max_interval, :max_elapsed_time, :max_retries, keyword_init: true ) do def initialize(**kwargs) # @type var kwargs: untyped kwargs[:initial_interval] = 0.1 unless kwargs.key?(:initial_interval) kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor) kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier) kwargs[:max_interval] = 5.0 unless kwargs.key?(:max_interval) kwargs[:max_elapsed_time] = 10.0 unless kwargs.key?(:max_elapsed_time) kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries) super end end |
#max_elapsed_time ⇒ Float
Returns Maximum total time, default 10.0. Can use 0 for no max.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/temporalio/client/connection.rb', line 67 RPCRetryOptions = Struct.new( :initial_interval, :randomization_factor, :multiplier, :max_interval, :max_elapsed_time, :max_retries, keyword_init: true ) do def initialize(**kwargs) # @type var kwargs: untyped kwargs[:initial_interval] = 0.1 unless kwargs.key?(:initial_interval) kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor) kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier) kwargs[:max_interval] = 5.0 unless kwargs.key?(:max_interval) kwargs[:max_elapsed_time] = 10.0 unless kwargs.key?(:max_elapsed_time) kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries) super end end |
#max_interval ⇒ Float
Returns Maximum backoff interval, default 5.0.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/temporalio/client/connection.rb', line 67 RPCRetryOptions = Struct.new( :initial_interval, :randomization_factor, :multiplier, :max_interval, :max_elapsed_time, :max_retries, keyword_init: true ) do def initialize(**kwargs) # @type var kwargs: untyped kwargs[:initial_interval] = 0.1 unless kwargs.key?(:initial_interval) kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor) kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier) kwargs[:max_interval] = 5.0 unless kwargs.key?(:max_interval) kwargs[:max_elapsed_time] = 10.0 unless kwargs.key?(:max_elapsed_time) kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries) super end end |
#max_retries ⇒ Integer
Returns Maximum number of retries, default 10.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/temporalio/client/connection.rb', line 67 RPCRetryOptions = Struct.new( :initial_interval, :randomization_factor, :multiplier, :max_interval, :max_elapsed_time, :max_retries, keyword_init: true ) do def initialize(**kwargs) # @type var kwargs: untyped kwargs[:initial_interval] = 0.1 unless kwargs.key?(:initial_interval) kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor) kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier) kwargs[:max_interval] = 5.0 unless kwargs.key?(:max_interval) kwargs[:max_elapsed_time] = 10.0 unless kwargs.key?(:max_elapsed_time) kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries) super end end |
#multiplier ⇒ Float
Returns Backoff multiplier, default 1.5.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/temporalio/client/connection.rb', line 67 RPCRetryOptions = Struct.new( :initial_interval, :randomization_factor, :multiplier, :max_interval, :max_elapsed_time, :max_retries, keyword_init: true ) do def initialize(**kwargs) # @type var kwargs: untyped kwargs[:initial_interval] = 0.1 unless kwargs.key?(:initial_interval) kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor) kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier) kwargs[:max_interval] = 5.0 unless kwargs.key?(:max_interval) kwargs[:max_elapsed_time] = 10.0 unless kwargs.key?(:max_elapsed_time) kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries) super end end |
#randomization_factor ⇒ Float
Returns Randomization jitter to add, default 0.2.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/temporalio/client/connection.rb', line 67 RPCRetryOptions = Struct.new( :initial_interval, :randomization_factor, :multiplier, :max_interval, :max_elapsed_time, :max_retries, keyword_init: true ) do def initialize(**kwargs) # @type var kwargs: untyped kwargs[:initial_interval] = 0.1 unless kwargs.key?(:initial_interval) kwargs[:randomization_factor] = 0.2 unless kwargs.key?(:randomization_factor) kwargs[:multiplier] = 1.5 unless kwargs.key?(:multiplier) kwargs[:max_interval] = 5.0 unless kwargs.key?(:max_interval) kwargs[:max_elapsed_time] = 10.0 unless kwargs.key?(:max_elapsed_time) kwargs[:max_retries] = 10 unless kwargs.key?(:max_retries) super end end |