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

DM-43288: Ensure per-request database sessions are closed #242

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

rra
Copy link
Member

@rra rra commented Mar 13, 2024

In the db_session_dependency FastAPI dependency, do database session cleanup in a finally block. This will hopefully ensure that the sessions are cleaned up even on uncaught exceptions, which in turn fixes warnings in test cases in other packages.

In the db_session_dependency FastAPI dependency, do database session
cleanup in a finally block. This will hopefully ensure that the
sessions are cleaned up even on uncaught exceptions, which in turn
fixes warnings in test cases in other packages.
@rra rra requested a review from jonathansick March 13, 2024 00:55
Copy link
Member

@jonathansick jonathansick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@rra rra merged commit db7f415 into main Mar 14, 2024
6 checks passed
@rra rra deleted the tickets/DM-43288 branch March 14, 2024 20:34
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.

2 participants