Spaces:
Running
Running
Fix warning about un-awaited coroutine.
Browse files
lynxkite-app/src/lynxkite_app/crdt.py
CHANGED
@@ -63,7 +63,8 @@ class WorkspaceWebsocketServer(pycrdt_websocket.WebsocketServer):
|
|
63 |
room.ws = ws
|
64 |
|
65 |
def on_change(changes):
|
66 |
-
asyncio.create_task(workspace_changed(name, changes, ws))
|
|
|
67 |
|
68 |
ws.observe_deep(on_change)
|
69 |
return room
|
|
|
63 |
room.ws = ws
|
64 |
|
65 |
def on_change(changes):
|
66 |
+
task = asyncio.create_task(workspace_changed(name, changes, ws))
|
67 |
+
task.add_done_callback(lambda t: t.result())
|
68 |
|
69 |
ws.observe_deep(on_change)
|
70 |
return room
|