debug: проверка h2/httpx в /test debug

This commit is contained in:
2026-06-14 07:39:02 +04:00
parent c97f26d04d
commit b457de4bb3
+11
View File
@@ -120,6 +120,17 @@ def test():
vars_info[k] = f"{v[:6]}... (len={len(v)})" if v else "(empty)"
elif any(x in k.upper() for x in ("DB_", "LLM_", "FLASK", "PORT")):
vars_info[k] = v
# добавим проверку h2 и httpx
try:
import h2
vars_info["h2_available"] = True
except ImportError:
vars_info["h2_available"] = False
try:
import httpx
vars_info["httpx_version"] = httpx.__version__
except ImportError:
vars_info["httpx_version"] = "not installed"
return jsonify({"env": vars_info, "python": _os.sys.version})
return jsonify({"error": f"unknown action: {action}"}), 400