Class: Temporalio::Worker::PollerBehavior::SimpleMaximum

Inherits:
Temporalio::Worker::PollerBehavior show all
Defined in:
lib/temporalio/worker/poller_behavior.rb

Overview

A poller behavior that attempts to poll as long as a slot is available, up to the provided maximum. Cannot be less than two for workflow tasks, or one for other tasks.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(maximum) ⇒ SimpleMaximum

Returns a new instance of SimpleMaximum.

Parameters:

  • maximum (Integer)

    Maximum number of concurrent poll requests.



19
20
21
22
# File 'lib/temporalio/worker/poller_behavior.rb', line 19

def initialize(maximum)
  super()
  @maximum = maximum
end

Instance Attribute Details

#maximumInteger (readonly)

Returns Maximum number of concurrent poll requests.

Returns:

  • (Integer)

    Maximum number of concurrent poll requests.



16
17
18
# File 'lib/temporalio/worker/poller_behavior.rb', line 16

def maximum
  @maximum
end