updating and refactoring codebase for improved performance and maintainability

This commit is contained in:
2026-05-03 17:29:32 -07:00
parent b7d3dc5f2d
commit 77cab1bd27
17 changed files with 590 additions and 294 deletions
+3 -4
View File
@@ -2,8 +2,6 @@ from __future__ import annotations
from typing import Any
import httpx
from SYS.result_table import Table
@@ -68,9 +66,10 @@ def ping_url(url: str, timeout: float = 3.0) -> tuple[bool, str]:
code = int(getattr(response, "status_code", 0) or 0)
ok = 200 <= code < 500
return ok, f"{url} (HTTP {code})"
except httpx.TimeoutException:
return False, f"{url} (timeout)"
except Exception as exc:
import httpx as _httpx
if isinstance(exc, _httpx.TimeoutException):
return False, f"{url} (timeout)"
return False, f"{url} ({type(exc).__name__})"