Skip to content

Commit 909f168

Browse files
committed
CI typecheck
1 parent b66cf4d commit 909f168

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

frontend_single_user/app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ def fetch_llm_info_with_retry(max_attempts: int = 15, delay_seconds: float = 2.0
210210
Try to fetch LLM info with retries so the UI doesn't crash if the worker
211211
isn't ready yet (e.g., cold start or delayed boot).
212212
"""
213+
if max_attempts < 1:
214+
raise ValueError("max_attempts must be >= 1")
215+
213216
for attempt in range(1, max_attempts + 1):
214217
try:
215218
return worker_client.get_llm_info()
@@ -225,6 +228,8 @@ def fetch_llm_info_with_retry(max_attempts: int = 15, delay_seconds: float = 2.0
225228
raise
226229
time.sleep(delay_seconds)
227230

231+
raise RuntimeError("Unable to fetch LLM info after retry loop")
232+
228233
llm_info: LLMInfo = fetch_llm_info_with_retry()
229234
logger.info(f"LLMInfo.ollama_status: {llm_info.ollama_status.value}")
230235
logger.info(f"LLMInfo.error_message_list: {llm_info.error_message_list}")

0 commit comments

Comments
 (0)