Reviewer correctly identified that removing the finally block introduced real connection leaks for handlers that do not call db.close() on their own error paths. Peewee's PooledDatabase.close() is a no-op on the second call, so double-close is harmless — the finally block provides necessary safety net. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| routers_v3 | ||
| services | ||
| __init__.py | ||
| db_engine.py | ||
| dependencies.py | ||
| main.py | ||