class documentation
class WorkerTuner(ABC): (source)
Known subclasses: temporalio.worker._tuning._CompositeTuner
Constructors: WorkerTuner.create_composite(workflow_supplier, activity_supplier, local_activity_supplier)
, WorkerTuner.create_fixed(workflow_slots, activity_slots, local_activity_slots)
, WorkerTuner.create_resource_based(target_memory_usage, target_cpu_usage, workflow_config, activity_config, local_activity_config)
WorkerTuners allow for the dynamic customization of some aspects of worker configuration
Static Method | create |
Create a tuner composed of the provided slot suppliers. |
Static Method | create |
Create a fixed-size tuner with the provided number of slots. Any unspecified slots will default to 100. |
Static Method | create |
Create a resource-based tuner with the provided options. |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _to |
Undocumented |
@staticmethod
def create_composite(*, workflow_supplier:
def create_composite(*, workflow_supplier:
SlotSupplier
, activity_supplier: SlotSupplier
, local_activity_supplier: SlotSupplier
) -> WorkerTuner
:
(source)
¶
Create a tuner composed of the provided slot suppliers.
@staticmethod
def create_fixed(*, workflow_slots:
def create_fixed(*, workflow_slots:
Optional[ int]
, activity_slots: Optional[ int]
, local_activity_slots: Optional[ int]
) -> WorkerTuner
:
(source)
¶
Create a fixed-size tuner with the provided number of slots. Any unspecified slots will default to 100.
@staticmethod
def create_resource_based(*, target_memory_usage:
def create_resource_based(*, target_memory_usage:
float
, target_cpu_usage: float
, workflow_config: Optional[ ResourceBasedSlotConfig]
= None, activity_config: Optional[ ResourceBasedSlotConfig]
= None, local_activity_config: Optional[ ResourceBasedSlotConfig]
= None) -> WorkerTuner
:
(source)
¶
Create a resource-based tuner with the provided options.