hiding websocket initalization behind authentication

This commit is contained in:
shcodenick
2025-04-30 15:05:57 +02:00
parent f7f3ae7cc9
commit 4c81b6ebc5
5 changed files with 66 additions and 50 deletions

View File

@@ -192,6 +192,9 @@ async def connect(sid, environ, auth):
# print(f"user {user.name}({user.id}) connected with session ID {sid}")
await sio.emit("user-list", {"user_ids": list(USER_POOL.keys())})
await sio.emit("usage", {"models": get_models_in_use()})
return True
return False
@sio.on("user-join")