Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add engine_callback hook to database backend SessionManager #10148

@avolant

Description

@avolant

Problem

Some deployments need per-connection authentication against the result database (e.g. AWS RDS IAM auth, HashiCorp Vault short-lived tokens, JWT injection). SQLAlchemy supports this via do_connect event listeners, but there is currently no hook to register them on the engine Celery creates.

Proposed solution

Add an engine_callback parameter to SessionManager and a database_engine_callback config setting on DatabaseBackend. The callback receives the engine immediately after creation, before any connections are made.

Fixed by #10135

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions