@
移除 IMGW / Synoptic 健康检查 两者均为可选 fallback 数据源,VPS 未配置且非核心链路 Synoptic 检查还存在变量名错误(查 SYNOPTIC_API_TOKEN 而非 NOAA_WRH_MESO_TOKEN) @
This commit is contained in:
@@ -26,10 +26,8 @@ const LABELS: Record<string, string> = {
|
||||
hko: "HKO (香港)",
|
||||
singapore_mss: "Singapore MSS",
|
||||
cwa: "CWA (台湾)",
|
||||
imgw: "IMGW (波兰)",
|
||||
polymarket_gamma: "Polymarket Gamma",
|
||||
polymarket_clob: "Polymarket CLOB",
|
||||
synoptic: "Synoptic Data",
|
||||
amos: "AMOS (韩国跑道)",
|
||||
amsc_awos: "AMSC AWOS (中国)",
|
||||
noaa_wrh: "NOAA WRH (美国结算)",
|
||||
|
||||
+2
-23
@@ -690,18 +690,6 @@ def get_ops_health_check(request: Request) -> dict[str, Any]:
|
||||
else:
|
||||
results["cwa"] = {"ok": False, "error": "not configured"}
|
||||
|
||||
# IMGW (Poland)
|
||||
imgw_token = str(os.getenv("IMGW_METEO_API_TOKEN") or "").strip()
|
||||
if imgw_token:
|
||||
try:
|
||||
t0 = _time.perf_counter()
|
||||
r = _r.get("https://meteo.imgw.pl/api/v1/station/aviation", timeout=timeout, headers={"Authorization": f"Bearer {imgw_token}"})
|
||||
results["imgw"] = {"ok": r.ok, "status": r.status_code, "latency_ms": round((_time.perf_counter() - t0) * 1000)}
|
||||
except Exception as e:
|
||||
results["imgw"] = {"ok": False, "error": str(e)[:100]}
|
||||
else:
|
||||
results["imgw"] = {"ok": False, "error": "not configured"}
|
||||
|
||||
# Polymarket Gamma API
|
||||
try:
|
||||
t0 = _time.perf_counter()
|
||||
@@ -718,17 +706,8 @@ def get_ops_health_check(request: Request) -> dict[str, Any]:
|
||||
except Exception as e:
|
||||
results["polymarket_clob"] = {"ok": False, "error": str(e)[:100]}
|
||||
|
||||
# Synoptic Data (US settlement verification)
|
||||
synoptic_token = str(os.getenv("SYNOPTIC_API_TOKEN") or "").strip()
|
||||
if synoptic_token:
|
||||
try:
|
||||
t0 = _time.perf_counter()
|
||||
r = _r.get(f"https://api.synopticdata.com/v2/stations/metadata?token={synoptic_token}&limit=1", timeout=timeout)
|
||||
results["synoptic"] = {"ok": r.ok, "status": r.status_code, "latency_ms": round((_time.perf_counter() - t0) * 1000)}
|
||||
except Exception as e:
|
||||
results["synoptic"] = {"ok": False, "error": str(e)[:100]}
|
||||
else:
|
||||
results["synoptic"] = {"ok": False, "error": "not configured"}
|
||||
|
||||
|
||||
|
||||
# AMOS (Korea runway sensors)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user