module documentation
Undocumented
| Type Alias | |
Undocumented |
| Variable | logger |
Undocumented |
| Class | _ |
External dependencies injected for testability. |
| Function | _default |
Extract (request_id, function_arn) from a Lambda context object. |
| Function | _default |
Undocumented |
| Async Function | _invocation |
Run configure (see run_worker for the forms) against a fresh per-invocation config and yield it. For the generator / context-manager forms, post-yield teardown runs when the caller's block exits, including on error... |
| Async Function | _invocation |
Handle a single Lambda invocation. |
| Function | _run |
Core logic with injected dependencies for testability. |
| Function | _validate |
Raise if no task queue has been configured. |
Undocumented
| Value |
|
async def _invocation_config_scope(configure:
ConfigureCallback, new_config: Callable[ [], LambdaWorkerConfig]) -> AsyncGenerator[ LambdaWorkerConfig, None]:
(source)
¶
Run configure (see run_worker for the forms) against a fresh per-invocation config and yield it. For the generator / context-manager forms, post-yield teardown runs when the caller's block exits, including on error. Task queue is validated after setup. The config's shutdown hooks run even if validation fails, before that teardown.
async def _invocation_handler(*, lambda_context:
Any, configure: ConfigureCallback, new_config: Callable[ [], LambdaWorkerConfig], deps: _WorkerDeps, extract_lambda_ctx: Callable[ [ Any], tuple[ str, str] | None]):
(source)
¶
Handle a single Lambda invocation.
def _run_worker_internal(version:
WorkerDeploymentVersion, configure: ConfigureCallback, deps: _WorkerDeps) -> Callable[ [ Any, Any], None]:
(source)
¶
Core logic with injected dependencies for testability.