Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run startup and shutdown before handle http request #142

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

carderne
Copy link

@carderne carderne commented Sep 9, 2022

We're using this diff to work with a stac-fastapi app that needs to set up and tear down a DB connection for each request.

I'm not sure how generic this API is supposed to be, but this should definitely work with any Starlette implementation (relevant startup code here.

Fully understand if the scope for this library is broader, I haven't done much due diligence.

@tonybaloney
Copy link
Contributor

Thanks for the PR, there's a lot of edge cases and scenarios to handle, I've submitted a PR, #187 with a full implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants