Lambda handler
celery_cloud.runners.aws_lambda contains the entry point of the runner:
lambda_handler. Configure it as the handler of the Lambda function
(celery_cloud.runners.aws_lambda.lambda_handler).
- celery_cloud.runners.aws_lambda.lambda_handler(event: dict[str, Any], context: Any) dict[str, Any][source]
Lambda handler for processing Celery Broker events
Every record of the batch is processed independently. Failures are reported in the response and, when the task state could not be stored in the backend, in
batchItemFailuresso SQS delivers the message again (requiresReportBatchItemFailuresin the event source mapping).
- celery_cloud.runners.aws_lambda.call_task(task: Task, seconds_left: float | None = None) Any[source]
Execute a Celery task and return the result.
- Parameters:
task – The task to run.
seconds_left – Seconds before AWS stops the invocation (None = unknown). The task is stopped before that, with the time limits of the message.