compose refactor

This commit is contained in:
grillazz
2025-09-20 17:38:01 +02:00
parent ca89d54513
commit b0c7722d29
5 changed files with 41 additions and 31 deletions

View File

@@ -36,6 +36,9 @@ async def lifespan(app: FastAPI):
"Postgres pool created", idle_size=app.postgres_pool.get_idle_size()
)
yield
except Exception as e:
await logger.aerror("Error during app startup", error=repr(e))
raise
finally:
await app.redis.close()
await app.postgres_pool.close()