chore: restructure project directory and update Dockerfile paths
Build and Push to Registry / build (push) Successful in 8s

This commit is contained in:
2026-04-12 00:27:30 +02:00 Unverified
parent 22235790d6
commit a4d73efa77
15 changed files with 9 additions and 6 deletions
+22
View File
@@ -0,0 +1,22 @@
import redis.asyncio as aioredis
from core.config import settings
_redis_pool: aioredis.Redis | None = None
async def init_redis() -> None:
global _redis_pool
_redis_pool = aioredis.from_url(
settings.REDIS_URL, encoding="utf-8", decode_responses=True
)
async def close_redis() -> None:
if _redis_pool:
await _redis_pool.aclose()
async def get_redis() -> aioredis.Redis:
if _redis_pool is None:
raise RuntimeError("Redis pool has not been initialized")
return _redis_pool