Spaces:
Running
Running
Update test.py
Browse files
test.py
CHANGED
@@ -218,10 +218,10 @@ async def test_websocket(websocket: WebSocket):
|
|
218 |
access_token = code
|
219 |
messages=get_messages(access_token)
|
220 |
print(len(messages))
|
221 |
-
await websocket.send_json({"message 1":0})
|
222 |
-
time.sleep(1)
|
223 |
-
await websocket.send_text("message 2")
|
224 |
-
time.sleep(1)
|
225 |
|
226 |
attachments = []
|
227 |
prev_data=""
|
@@ -278,6 +278,7 @@ async def test_websocket(websocket: WebSocket):
|
|
278 |
print("yo")
|
279 |
# print(data_new)
|
280 |
attachment_no+=1
|
|
|
281 |
await websocket.send_json({filename:data})
|
282 |
|
283 |
# yield f"data: {str(data_new)}\n\n"
|
|
|
218 |
access_token = code
|
219 |
messages=get_messages(access_token)
|
220 |
print(len(messages))
|
221 |
+
# await websocket.send_json({"message 1":0})
|
222 |
+
# time.sleep(1)
|
223 |
+
# await websocket.send_text("message 2")
|
224 |
+
# time.sleep(1)
|
225 |
|
226 |
attachments = []
|
227 |
prev_data=""
|
|
|
278 |
print("yo")
|
279 |
# print(data_new)
|
280 |
attachment_no+=1
|
281 |
+
time.sleep(2)
|
282 |
await websocket.send_json({filename:data})
|
283 |
|
284 |
# yield f"data: {str(data_new)}\n\n"
|