Watching code cleanup
This commit is contained in:
1 parent
0be72827db
commit
540e825cc3
2 files changed
+31
-31
No files matched your search
+2
-2
@@ -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())
|
||||
|
||||
Reference in new issue
Block a user