Watching code cleanup

This commit is contained in:
Leo Vasanko committed 2023-11-12 19:58:37 +00:00
1 parent 0be72827db
commit 540e825cc3
2 files changed
+31 -31

No files matched your search

+2 -2
View File
@@ -107,8 +107,8 @@ async def watch(req, ws):
with watching.state.lock:
q = watching.pubsub[uuid] = asyncio.Queue()
# Init with disk usage and full tree
await ws.send(watching.format_du(watching.state.space))
await ws.send(watching.format_tree(watching.state.root))
await ws.send(watching.format_space(watching.state.space))
await ws.send(watching.format_root(watching.state.root))
# Send updates
while True:
await ws.send(await q.get())