revert: back to baseline (no flow control), bump 1.0.18
Deploy loadtest / validate (push) Waiting to run
Deploy loadtest / validate (push) Waiting to run
This commit is contained in:
+1
-2
@@ -22,7 +22,7 @@ def health():
|
||||
|
||||
@sock.route('/ws-upload')
|
||||
def ws_upload(ws):
|
||||
"""WebSocket: получает чанки, ACK после каждого, считает байты и время"""
|
||||
"""WebSocket: получает чанки, считает байты и время"""
|
||||
t0 = time.time()
|
||||
total = 0
|
||||
while True:
|
||||
@@ -32,7 +32,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}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user