From a115c83cba5b7072ded50f0577cd7248f6675889 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 19 Nov 2025 20:49:42 +0100 Subject: [PATCH] Make scanner ready check a noop (#1166) --- scanner/scanner/routers/routes.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scanner/scanner/routers/routes.py b/scanner/scanner/routers/routes.py index 41c30d23..37fbaee5 100644 --- a/scanner/scanner/routers/routes.py +++ b/scanner/scanner/routers/routes.py @@ -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)} +# )