Class: Temporalio::Worker::Tuner::ResourceBasedSlotOptions

Inherits:
Data
  • Object
show all
Defined in:
lib/temporalio/worker/tuner.rb

Overview

Options for a specific slot type being used with SlotSupplier::ResourceBased.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#max_slotsObject (readonly)

Returns the value of attribute max_slots

Returns:

  • (Object)

    the current value of max_slots



254
255
256
257
258
# File 'lib/temporalio/worker/tuner.rb', line 254

ResourceBasedSlotOptions = Data.define(
  :min_slots,
  :max_slots,
  :ramp_throttle
)

#min_slotsObject (readonly)

Returns the value of attribute min_slots

Returns:

  • (Object)

    the current value of min_slots



254
255
256
257
258
# File 'lib/temporalio/worker/tuner.rb', line 254

ResourceBasedSlotOptions = Data.define(
  :min_slots,
  :max_slots,
  :ramp_throttle
)

#ramp_throttleObject (readonly)

Returns the value of attribute ramp_throttle

Returns:

  • (Object)

    the current value of ramp_throttle



254
255
256
257
258
# File 'lib/temporalio/worker/tuner.rb', line 254

ResourceBasedSlotOptions = Data.define(
  :min_slots,
  :max_slots,
  :ramp_throttle
)

Instance Method Details

#max_slots=(value) ⇒ Integer? (readonly)

Returns Maximum amount of slots permitted. Defaults to 500.

Returns:

  • (Integer, nil)

    Maximum amount of slots permitted. Defaults to 500.



254
255
256
257
258
# File 'lib/temporalio/worker/tuner.rb', line 254

ResourceBasedSlotOptions = Data.define(
  :min_slots,
  :max_slots,
  :ramp_throttle
)

#min_slots=(value) ⇒ Integer? (readonly)

Returns Amount of slots that will be issued regardless of any other checks. Defaults to 5 for workflows and 1 for activities.

Returns:

  • (Integer, nil)

    Amount of slots that will be issued regardless of any other checks. Defaults to 5 for workflows and 1 for activities.



254
255
256
257
258
# File 'lib/temporalio/worker/tuner.rb', line 254

ResourceBasedSlotOptions = Data.define(
  :min_slots,
  :max_slots,
  :ramp_throttle
)

#ramp_throttle=(value) ⇒ Float? (readonly)

Returns Minimum time we will wait (after passing the minimum slots number) between handing out new slots in seconds. Defaults to 0 for workflows and 0.05 for activities.

This value matters because how many resources a task will use cannot be determined ahead of time, and thus the system should wait to see how much resources are used before issuing more slots.

Returns:

  • (Float, nil)

    Minimum time we will wait (after passing the minimum slots number) between handing out new slots in seconds. Defaults to 0 for workflows and 0.05 for activities.

    This value matters because how many resources a task will use cannot be determined ahead of time, and thus the system should wait to see how much resources are used before issuing more slots.



254
255
256
257
258
# File 'lib/temporalio/worker/tuner.rb', line 254

ResourceBasedSlotOptions = Data.define(
  :min_slots,
  :max_slots,
  :ramp_throttle
)