class documentation

class LambdaWorkerConfig: (source)

View In Hierarchy

Passed to the configure callback of run_worker.

Fields are pre-populated with Lambda-appropriate defaults before the configure callback is invoked; the callback may read and override any of them.

Use worker_config to set task queue, register workflows/activities, and tune worker options. The task_queue key is pre-populated from the TEMPORAL_TASK_QUEUE environment variable if set.

Instance Variable client_connect_config Keyword arguments that will be passed to temporalio.client.Client.connect. Pre-populated from the config file / environment variables via envconfig, with Lambda defaults applied.
Instance Variable shutdown_deadline_buffer How long before the Lambda invocation deadline the worker begins its shutdown sequence (worker drain + shutdown hooks). Pre-populated to graceful_shutdown_timeout + 2s. If you change graceful_shutdown_timeout...
Instance Variable shutdown_hooks Functions called at the end of each Lambda invocation, after the worker has stopped. Run in list order. Each may be sync or async. Use this to flush telemetry providers or release other per-process resources.
Instance Variable worker_config Keyword arguments that will be passed to the temporalio.worker.Worker constructor (the client key is managed internally). Pre-populated with Lambda-appropriate defaults (low concurrency, eager activities disabled) and ...
client_connect_config: ClientConnectConfig = (source)

Keyword arguments that will be passed to temporalio.client.Client.connect. Pre-populated from the config file / environment variables via envconfig, with Lambda defaults applied.

shutdown_deadline_buffer: timedelta = (source)

How long before the Lambda invocation deadline the worker begins its shutdown sequence (worker drain + shutdown hooks). Pre-populated to graceful_shutdown_timeout + 2s. If you change graceful_shutdown_timeout in worker_config, adjust this accordingly.

shutdown_hooks: list[Callable[[], Awaitable[None] | None]] = (source)

Functions called at the end of each Lambda invocation, after the worker has stopped. Run in list order. Each may be sync or async. Use this to flush telemetry providers or release other per-process resources.

worker_config: WorkerConfig = (source)

Keyword arguments that will be passed to the temporalio.worker.Worker constructor (the client key is managed internally). Pre-populated with Lambda-appropriate defaults (low concurrency, eager activities disabled) and task_queue from TEMPORAL_TASK_QUEUE if set.