module documentation

Lambda-tuned defaults for Temporal worker and client configuration.

Function apply_lambda_worker_defaults Apply Lambda-appropriate defaults to worker config.
Function build_lambda_identity Build a worker identity string from the Lambda invocation context.
Function lambda_default_config_file_path Return the config file path for a Lambda environment.
Constant DEFAULT_ACTIVITY_TASK_POLLER_BEHAVIOR Undocumented
Constant DEFAULT_CONFIG_FILE Undocumented
Constant DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT Undocumented
Constant DEFAULT_MAX_CACHED_WORKFLOWS Undocumented
Constant DEFAULT_MAX_CONCURRENT_ACTIVITIES Undocumented
Constant DEFAULT_MAX_CONCURRENT_LOCAL_ACTIVITIES Undocumented
Constant DEFAULT_MAX_CONCURRENT_NEXUS_TASKS Undocumented
Constant DEFAULT_MAX_CONCURRENT_WORKFLOW_TASKS Undocumented
Constant DEFAULT_NEXUS_TASK_POLLER_BEHAVIOR Undocumented
Constant DEFAULT_SHUTDOWN_HOOK_BUFFER Undocumented
Constant DEFAULT_WORKFLOW_TASK_POLLER_BEHAVIOR Undocumented
Constant ENV_CONFIG_FILE Undocumented
Constant ENV_LAMBDA_TASK_ROOT Undocumented
Constant ENV_TASK_QUEUE Undocumented
def apply_lambda_worker_defaults(config: WorkerConfig): (source)

Apply Lambda-appropriate defaults to worker config.

Only sets values that have not already been set (i.e. are absent from config). disable_eager_activity_execution is always set to True.

def build_lambda_identity(request_id: str, function_arn: str) -> str: (source)

Build a worker identity string from the Lambda invocation context.

Format: <request_id>@<function_arn>.

def lambda_default_config_file_path(getenv: Callable[[str], str] = os.environ.get) -> Path: (source)

Return the config file path for a Lambda environment.

Resolution order:

  1. TEMPORAL_CONFIG_FILE env var, if set.
  2. temporal.toml in $LAMBDA_TASK_ROOT (typically /var/task).
  3. temporal.toml in the current working directory.
DEFAULT_ACTIVITY_TASK_POLLER_BEHAVIOR = (source)

Undocumented

Value
PollerBehaviorSimpleMaximum(maximum=1)
DEFAULT_CONFIG_FILE: str = (source)

Undocumented

Value
'temporal.toml'
DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT: timedelta = (source)

Undocumented

Value
timedelta(seconds=5)
DEFAULT_MAX_CACHED_WORKFLOWS: int = (source)

Undocumented

Value
30
DEFAULT_MAX_CONCURRENT_ACTIVITIES: int = (source)

Undocumented

Value
2
DEFAULT_MAX_CONCURRENT_LOCAL_ACTIVITIES: int = (source)

Undocumented

Value
2
DEFAULT_MAX_CONCURRENT_NEXUS_TASKS: int = (source)

Undocumented

Value
5
DEFAULT_MAX_CONCURRENT_WORKFLOW_TASKS: int = (source)

Undocumented

Value
10
DEFAULT_NEXUS_TASK_POLLER_BEHAVIOR = (source)

Undocumented

Value
PollerBehaviorSimpleMaximum(maximum=1)
DEFAULT_SHUTDOWN_HOOK_BUFFER: timedelta = (source)

Undocumented

Value
timedelta(seconds=2)
DEFAULT_WORKFLOW_TASK_POLLER_BEHAVIOR = (source)

Undocumented

Value
PollerBehaviorSimpleMaximum(maximum=2)
ENV_CONFIG_FILE: str = (source)

Undocumented

Value
'TEMPORAL_CONFIG_FILE'
ENV_LAMBDA_TASK_ROOT: str = (source)

Undocumented

Value
'LAMBDA_TASK_ROOT'
ENV_TASK_QUEUE: str = (source)

Undocumented

Value
'TEMPORAL_TASK_QUEUE'