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")
|
||||
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)}
|
||||
)
|
||||
def get_ready():
|
||||
# child spans (`select 1` & db connection reset) was still logged,
|
||||
# since i don't really wanna deal with it, let's just do that.
|
||||
return {"status": "healthy"}
|
||||
|
||||
|
||||
# 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