project/shmuliar-FIX-01-store-websocket-push #27
@@ -55,7 +55,8 @@ async def websocket_endpoint(websocket: WebSocket, user_id: int):
|
||||
for i in jsonable_data:
|
||||
i['timestamp'] = i['timestamp'].strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
await websocket.send_json(json.dumps(jsonable_data))
|
||||
for i in jsonable_data:
|
||||
await websocket.send_json(json.dumps([i]))
|
||||
|
||||
# receive forever
|
||||
while True:
|
||||
|
||||
Reference in New Issue
Block a user