Class: Temporalio::Worker::PollerBehavior::Autoscaling
- Inherits:
-
Temporalio::Worker::PollerBehavior
- Object
- Temporalio::Worker::PollerBehavior
- Temporalio::Worker::PollerBehavior::Autoscaling
- Defined in:
- lib/temporalio/worker/poller_behavior.rb
Overview
A poller behavior that automatically scales the number of pollers based on feedback from the server. A slot must be available before beginning polling.
Instance Attribute Summary collapse
-
#initial ⇒ Integer
readonly
Number of polls attempted initially before scaling kicks in.
-
#maximum ⇒ Integer
readonly
Maximum number of poll calls that will ever be open at once.
-
#minimum ⇒ Integer
readonly
Minimum number of poll calls (assuming slots are available).
Instance Method Summary collapse
-
#initialize(minimum: 1, maximum: 100, initial: 5) ⇒ Autoscaling
constructor
A new instance of Autoscaling.
Constructor Details
#initialize(minimum: 1, maximum: 100, initial: 5) ⇒ Autoscaling
Returns a new instance of Autoscaling.
43 44 45 46 47 48 |
# File 'lib/temporalio/worker/poller_behavior.rb', line 43 def initialize(minimum: 1, maximum: 100, initial: 5) super() @minimum = minimum @maximum = maximum @initial = initial end |
Instance Attribute Details
#initial ⇒ Integer (readonly)
Returns Number of polls attempted initially before scaling kicks in.
38 39 40 |
# File 'lib/temporalio/worker/poller_behavior.rb', line 38 def initial @initial end |
#maximum ⇒ Integer (readonly)
Returns Maximum number of poll calls that will ever be open at once.
36 37 38 |
# File 'lib/temporalio/worker/poller_behavior.rb', line 36 def maximum @maximum end |
#minimum ⇒ Integer (readonly)
Returns Minimum number of poll calls (assuming slots are available).
34 35 36 |
# File 'lib/temporalio/worker/poller_behavior.rb', line 34 def minimum @minimum end |