Redis push в фоновом потоке (не блокирует ответ), v1.41
This commit is contained in:
+4
-2
@@ -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:
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<body>
|
||||
<div class="topbar">
|
||||
<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 class="content">
|
||||
|
||||
Reference in New Issue
Block a user