changing to animation queue

This commit is contained in:
Ben Arc
2021-06-23 14:05:10 +01:00
parent 9ce7cb4b05
commit 22fe89a5f9
5 changed files with 92 additions and 127 deletions
+1 -1
View File
@@ -37,6 +37,7 @@ connected_websockets = defaultdict(set)
@copilot_ext.websocket("/ws/<id>/")
async def wss(id):
copilot = await get_copilot(id)
print(copilot)
if not copilot:
return "", HTTPStatus.FORBIDDEN
global connected_websockets
@@ -53,6 +54,5 @@ async def updater(copilot_id, data, comment):
copilot = await get_copilot(copilot_id)
if not copilot:
return
print(connected_websockets)
for queue in connected_websockets[copilot_id]:
await queue.send(f"{data + '-' + comment}")