fix: baseline WS client + gunicorn gevent, bump 1.0.23
Deploy loadtest / validate (push) Waiting to run

This commit is contained in:
2026-07-11 10:07:50 +04:00
parent 40d5fc9ec4
commit 1bd8a41c63
2 changed files with 24 additions and 43 deletions
+2 -3
View File
@@ -6,7 +6,7 @@ from flask_sock import Sock
app = Flask(__name__)
sock = Sock(app)
VERSION = '1.0.22'
VERSION = '1.0.23'
@app.route('/')
@@ -21,7 +21,7 @@ def health():
@sock.route('/ws-upload')
def ws_upload(ws):
"""WebSocket: получает чанки, ACK после каждого"""
"""WebSocket: получает чанки, считает байты и время"""
t0 = time.time()
total = 0
while True:
@@ -31,7 +31,6 @@ def ws_upload(ws):
if isinstance(chunk, str) and chunk == 'DONE':
break
total += len(chunk)
ws.send(json.dumps({'ack': total}))
elapsed = round((time.time() - t0) * 1000)
ws.send(json.dumps({'ok': True, 'bytes': total, 'elapsed_ms': elapsed}))