Spaces:
Running
Running
fix: resolve ImportError in /api/health/full — _sb2/_sb_fallback not in state.py [Manus 2026-08-08]
Browse files- api/providers.py +6 -1
api/providers.py
CHANGED
|
@@ -788,7 +788,11 @@ async def health_full(role: AuthRole = Depends(require_role(AuthRole.MACHINE))):
|
|
| 788 |
return {"ok": False, "error": str(exc)[:100]}
|
| 789 |
|
| 790 |
# ── Esegui tutti i check in parallelo ─────────────────────────────────────
|
| 791 |
-
from .state import _sb as _sb_h,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 792 |
|
| 793 |
(
|
| 794 |
c_sb1,
|
|
@@ -932,3 +936,4 @@ async def update_provider_models(role: AuthRole = Depends(require_role(AuthRole.
|
|
| 932 |
}
|
| 933 |
|
| 934 |
|
|
|
|
|
|
| 788 |
return {"ok": False, "error": str(exc)[:100]}
|
| 789 |
|
| 790 |
# ── Esegui tutti i check in parallelo ─────────────────────────────────────
|
| 791 |
+
from .state import _sb as _sb_h, _clients as _sb_clients_h
|
| 792 |
+
# FIX-HEALTH-FULL: _sb2 e _sb_fallback non esistono in state.py.
|
| 793 |
+
# Estraiamo i client dal pool _clients (A=primary, B=secondary, C=fallback).
|
| 794 |
+
_sb2_h = _sb_clients_h[1]["client"] if len(_sb_clients_h) > 1 else None
|
| 795 |
+
_sbf_h = _sb_clients_h[2]["client"] if len(_sb_clients_h) > 2 else None
|
| 796 |
|
| 797 |
(
|
| 798 |
c_sb1,
|
|
|
|
| 936 |
}
|
| 937 |
|
| 938 |
|
| 939 |
+
|