From f9cb9de91d04c1ecafc009c31306da4495bf539f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Wed, 17 Jun 2026 22:43:56 +0400 Subject: [PATCH] =?UTF-8?q?Redis=20push=20=D0=B2=20=D1=84=D0=BE=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BE=D0=BC=20=D0=BF=D0=BE=D1=82=D0=BE=D0=BA=D0=B5?= =?UTF-8?q?=20(=D0=BD=D0=B5=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B8=D1=80=D1=83?= =?UTF-8?q?=D0=B5=D1=82=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82),=20v1.41?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/app.py | 6 ++++-- site/templates/upload.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/site/app.py b/site/app.py index ce41c69..a488a28 100644 --- a/site/app.py +++ b/site/app.py @@ -180,8 +180,10 @@ class ContractsApp: finally: db.put_conn(conn) - # Файл — в Redis (мгновенно) - redis_client.push({"filename": filename, "b64": b64, "mime": mime, "cid": str(cid)}) + # Файл — в Redis (в фоне, не блокируем ответ) + import threading + task = {"filename": filename, "b64": b64, "mime": mime, "cid": str(cid)} + threading.Thread(target=redis_client.push, args=(task,), daemon=True).start() return jsonify({"contract_id": str(cid)}) except Exception as e: diff --git a/site/templates/upload.html b/site/templates/upload.html index 7980473..dd02aef 100644 --- a/site/templates/upload.html +++ b/site/templates/upload.html @@ -59,7 +59,7 @@
Nubes - Сверка договоров v1.40 + Сверка договоров v1.41