added a session storage policy in Redis
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from fastapi import APIRouter, Request
|
||||
|
||||
from app.core.database import check_database
|
||||
from app.core.redis import check_redis
|
||||
from app.errors.exceptions import unavailable
|
||||
from app.schemas.base import Health
|
||||
|
||||
@@ -16,4 +17,6 @@ async def liveness() -> Health:
|
||||
async def readiness(request: Request) -> Health:
|
||||
if not await check_database(request.app.state.engine):
|
||||
raise unavailable()
|
||||
if not await check_redis(request.app.state.redis):
|
||||
raise unavailable()
|
||||
return Health(status="ok")
|
||||
|
||||
Reference in New Issue
Block a user