Skip to content

Fix lifespan execution order #107

@jordaneremieff

Description

@jordaneremieff

While working on the example app I've run into an issue when interacting with the database in post requests. The initial request seems to work fine (db on startup/on close execute properly in lifespan context), but if I make a post request using a form (e.g. a login) the connection pool isn't acquired. I think this is because the lifespan startup should be run not in the adapter constructor, but rather in the event handler - this seemed to work and makes sense.

I'll make a PR for this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions