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

Properly use context managers for async SQLAlchemy connections #360

Closed
holtgrewe opened this issue Jan 3, 2024 · 1 comment · Fixed by #361
Closed

Properly use context managers for async SQLAlchemy connections #360

holtgrewe opened this issue Jan 3, 2024 · 1 comment · Fixed by #361
Labels
enhancement New feature or request
Milestone

Comments

@holtgrewe
Copy link
Member

Is your feature request related to a problem? Please describe.
We do not properly use context managers for the async SQLAlchemy connections. We then get errors The garbage collector is trying to clean up non-checked-in connection <AdaptedConnection <asyncpg....

Describe the solution you'd like
Review all code such that we properly use context managers everywhere.

Describe alternatives you've considered
N/A

Additional context
N/A

@holtgrewe holtgrewe added the enhancement New feature or request label Jan 3, 2024
@holtgrewe holtgrewe added this to the 0.5.0 milestone Jan 3, 2024
@holtgrewe
Copy link
Member Author

I only found one place in deps.py but I'm uncertain whether this can cause issues.

Also, looking into whether we can use lifespan to force shutting down the engine.

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

Successfully merging a pull request may close this issue.

1 participant