refactor: remove Redis dependency and related code

This commit is contained in:
gabdevele
2026-05-05 15:01:14 +02:00 Unverified
parent a523c2faa3
commit d977a953cc
21 changed files with 504 additions and 158 deletions
-3
View File
@@ -7,7 +7,6 @@ from api.editor.router import router as editor_router
from api.proxy.router import router as proxy_router
from core.config import settings
from core.mongodb import close_mongodb, init_mongodb
from core.redis import close_redis, init_redis
from core.security import hash_password
from fastapi import FastAPI
from integrations.docker import get_all_services_in_dir
@@ -21,7 +20,6 @@ from services.mitmproxy.recovery import reconcile_runtime
@asynccontextmanager
async def lifespan(_: FastAPI):
await init_mongodb()
await init_redis()
await ensure_auth_indexes()
await ensure_single_account(
username=settings.AUTH_USERNAME,
@@ -56,7 +54,6 @@ async def lifespan(_: FastAPI):
try:
yield
finally:
await close_redis()
await close_mongodb()