Simplify healthcheck implementation and update Docker healthcheck command.

This commit is contained in:
Rykov
2026-03-22 01:07:37 +03:00
parent f32ccf4c9f
commit a53a82a151
2 changed files with 2 additions and 15 deletions
+1 -14
View File
@@ -51,17 +51,4 @@ def logs():
@app.get("/healthz")
async def healthcheck():
"""Проверка здоровья для Docker."""
# Cам FastAPI
result = {"status": "ok"}
# Telegram API
try:
resp = requests.get(BOT_API_URL)
if resp.status_code != 200:
result["telegram_api"] = f"error {resp.status_code}"
else:
result["telegram_api"] = "ok"
except Exception as e:
result["telegram_api"] = str(e)
return result
return {"status": "ok"}