From 820bcfcbb51dcc8a93558d4882af44c23e5b9378 Mon Sep 17 00:00:00 2001 From: Repinoid Date: Sun, 31 May 2026 17:54:30 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20nonlocal=20=E2=86=92=20global=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=5Fping=5Fllm=5Fcache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/routes.py b/api/routes.py index 0e8222f..aa5f815 100644 --- a/api/routes.py +++ b/api/routes.py @@ -196,7 +196,7 @@ def register(app): @app.route("/api/v1/ping-llm", methods=["GET"]) def ping_llm(): """Быстрая проверка доступности LLM (с кэшем 60с).""" - nonlocal _ping_llm_cache + global _ping_llm_cache now = time.time() if _ping_llm_cache and (now - _ping_llm_cache.get("ts", 0)) < 60: return jsonify(_ping_llm_cache["data"])