mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-08-10 20:50:25 +02:00
Expose AISHub as an optional ships-layer backup when AISStream is silent.
Wire AISHUB_USERNAME into API Keys and onboarding, and surface backup status on the AIS outage banner so operators can keep vessel coverage without changing the AISStream proxy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -111,6 +111,12 @@ async def health_check(request: Request):
|
||||
ais_status = ais_proxy_status() or {}
|
||||
except Exception:
|
||||
ais_status = {}
|
||||
try:
|
||||
from services.fetchers.aishub_fallback import aishub_fallback_enabled
|
||||
|
||||
ais_status["aishub_configured"] = bool(aishub_fallback_enabled())
|
||||
except Exception:
|
||||
ais_status["aishub_configured"] = bool(str(os.environ.get("AISHUB_USERNAME", "") or "").strip())
|
||||
if ais_status.get("degraded_tls") and top_status == "ok":
|
||||
# Don't override a worse top-level status if SLOs already failed,
|
||||
# but escalate ok -> degraded so the field surfaces in dashboards.
|
||||
|
||||
Reference in New Issue
Block a user