From 9cb966c3f6090decc317d86b55fb850f628aa26d Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Thu, 4 Dec 2025 00:49:31 -0500 Subject: [PATCH] Use health endpoint in check health --- scripts/healthcheck.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/healthcheck.py b/scripts/healthcheck.py index 37014c1..31bafa8 100644 --- a/scripts/healthcheck.py +++ b/scripts/healthcheck.py @@ -2,14 +2,10 @@ import requests import os port = os.environ.get('LT_PORT', '5000') -response = requests.post( - url=f'http://localhost:{port}/translate', +response = requests.get( + url=f'http://localhost:{port}/health', headers={'Content-Type': 'application/json'}, - json={ - 'q': 'Hello World!', - 'source': 'en', - 'target': 'en' - }, + json={}, timeout=60 ) response.raise_for_status() # if server unavailable then requests with raise exception and healthcheck will fail