Close redis connection on shutdown

This commit is contained in:
2023-03-30 14:03:19 +02:00
parent c62655f7ef
commit add1897813

View File

@@ -43,6 +43,8 @@ def start_app() -> FastAPI:
if database_.is_connected:
await database_.disconnect()
await app.state.redis.close()
Instrumentator(
should_ignore_untemplated=True,
excluded_handlers=["/docs", "/metrics", "/healthcheck"],