|
@@ -308,7 +308,7 @@ async def test(request: Request):
|
|
content["db"] = "broke"
|
|
content["db"] = "broke"
|
|
database.close()
|
|
database.close()
|
|
database.connect()
|
|
database.connect()
|
|
- if database.is_connected():
|
|
|
|
|
|
+ if database.is_connection_usable():
|
|
content["db"] = "broke , reconnect"
|
|
content["db"] = "broke , reconnect"
|
|
logging.info("reconnect database")
|
|
logging.info("reconnect database")
|
|
return JSONResponse(content=content, headers=headers)
|
|
return JSONResponse(content=content, headers=headers)
|