add health check endpoint for llm gateway

This commit is contained in:
Adil Hafeez 2025-02-28 16:58:11 -08:00
parent ae6b2bef59
commit d9c8f7ad7b
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
3 changed files with 18 additions and 4 deletions

View file

@ -80,9 +80,14 @@ def start_arch(arch_config_file, env, log_timeout=120, foreground=False):
start_time = time.time()
while True:
health_check_status = health_check_endpoint(
prompt_gateway_health_check_status = health_check_endpoint(
f"http://localhost:{prompt_gateway_port}/healthz"
)
llm_gateway_health_check_status = health_check_endpoint(
f"http://localhost:{llm_gateway_port}/healthz"
)
archgw_status = docker_container_status(ARCHGW_DOCKER_NAME)
current_time = time.time()
elapsed_time = current_time - start_time
@ -92,7 +97,7 @@ def start_arch(arch_config_file, env, log_timeout=120, foreground=False):
log.info(f"stopping log monitoring after {log_timeout} seconds.")
break
if health_check_status:
if prompt_gateway_health_check_status or llm_gateway_health_check_status:
log.info("archgw is running and is healthy!")
break
else: