fix: update
This commit is contained in:
@@ -10,7 +10,6 @@ from starlette.middleware.cors import CORSMiddleware
|
||||
from starlette.exceptions import HTTPException
|
||||
from fastapi.exceptions import RequestValidationError
|
||||
from src.application.domain.exceptions import ApplicationException, UnauthorizedException
|
||||
from src.infrastructure.cache import create_redis_client
|
||||
from src.infrastructure.vault import JwtKeyStore, start_jwt_keys_scheduler
|
||||
from src.infrastructure.utils import generate_instance_id
|
||||
from src.infrastructure.logger import logger
|
||||
@@ -46,8 +45,6 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
|
||||
logger.set_instance_id(instance_id)
|
||||
logger.info(f'B2B service instance started with id {instance_id}')
|
||||
|
||||
app.state.redis = create_redis_client()
|
||||
|
||||
if not settings.VAULT_ROLE_ID.strip() or not settings.VAULT_SECRET_ID.strip():
|
||||
raise RuntimeError('VAULT_ROLE_ID and VAULT_SECRET_ID must be set')
|
||||
|
||||
@@ -78,7 +75,6 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
|
||||
)
|
||||
logger.info('Crypto master key loaded from Vault')
|
||||
yield
|
||||
await app.state.redis.aclose()
|
||||
logger.info(f'B2B service instance ended with id {instance_id}')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user