mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-11-20 13:33:18 -05:00
Make scanner ready check a noop (#1166)
This commit is contained in:
parent
27d25f4829
commit
a115c83cba
@ -37,11 +37,17 @@ def get_health():
|
|||||||
|
|
||||||
|
|
||||||
@router.get("/ready")
|
@router.get("/ready")
|
||||||
async def get_ready(db: Annotated[Connection, Depends(get_db_fapi)]):
|
def get_ready():
|
||||||
try:
|
# child spans (`select 1` & db connection reset) was still logged,
|
||||||
_ = await db.execute("select 1")
|
# since i don't really wanna deal with it, let's just do that.
|
||||||
return {"status": "healthy", "database": "healthy"}
|
return {"status": "healthy"}
|
||||||
except Exception as e:
|
|
||||||
raise HTTPException(
|
|
||||||
status_code=500, detail={"status": "unhealthy", "database": str(e)}
|
# async def get_ready(db: Annotated[Connection, Depends(get_db_fapi)]):
|
||||||
)
|
# try:
|
||||||
|
# _ = await db.execute("select 1")
|
||||||
|
# return {"status": "healthy", "database": "healthy"}
|
||||||
|
# except Exception as e:
|
||||||
|
# raise HTTPException(
|
||||||
|
# status_code=500, detail={"status": "unhealthy", "database": str(e)}
|
||||||
|
# )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user