Redis push в фоновом потоке (не блокирует ответ), v1.41

This commit is contained in:
2026-06-17 22:43:56 +04:00
parent 9bae90e9a0
commit f9cb9de91d
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -180,8 +180,10 @@ class ContractsApp:
finally: finally:
db.put_conn(conn) db.put_conn(conn)
# Файл — в Redis (мгновенно) # Файл — в Redis (в фоне, не блокируем ответ)
redis_client.push({"filename": filename, "b64": b64, "mime": mime, "cid": str(cid)}) 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)}) return jsonify({"contract_id": str(cid)})
except Exception as e: except Exception as e:
+1 -1
View File
@@ -59,7 +59,7 @@
<body> <body>
<div class="topbar"> <div class="topbar">
<img src="{{ url_for('static', filename='nubes-logo.svg') }}" alt="Nubes"> <img src="{{ url_for('static', filename='nubes-logo.svg') }}" alt="Nubes">
<span class="title">Сверка договоров <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.40</span></span> <span class="title">Сверка договоров <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.41</span></span>
</div> </div>
<div class="content"> <div class="content">