feat: add local keydb
This commit is contained in:
@@ -40,7 +40,6 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
|
||||
logger.set_instance_id(instance_id)
|
||||
logger.info(f'Users service instance started with id {instance_id}')
|
||||
|
||||
app.state.redis_local = create_redis_client(settings.KEYDB_LOCAL_URL)
|
||||
app.state.redis_remote = create_redis_client(settings.KEYDB_REMOTE_URL)
|
||||
app.state.redis = app.state.redis_remote
|
||||
|
||||
@@ -61,7 +60,6 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
|
||||
app.state.jwt_key_store = jwt_store
|
||||
app.state.jwt_keys_scheduler = jwt_scheduler
|
||||
yield
|
||||
await app.state.redis_local.aclose()
|
||||
await app.state.redis_remote.aclose()
|
||||
logger.info(f'Users service instance ended with id {instance_id}')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user