diff --git a/backend/open_webui/apps/socket/main.py b/backend/open_webui/apps/socket/main.py index d6f1a4999..e41ef8412 100644 --- a/backend/open_webui/apps/socket/main.py +++ b/backend/open_webui/apps/socket/main.py @@ -39,7 +39,7 @@ async def connect(sid, environ, auth): else: USER_POOL[user.id] = [sid] - print(f"user {user.name}({user.id}) connected with session ID {sid}") + # print(f"user {user.name}({user.id}) connected with session ID {sid}") await sio.emit("user-count", {"count": len(set(USER_POOL))}) await sio.emit("usage", {"models": get_models_in_use()}) @@ -47,7 +47,7 @@ async def connect(sid, environ, auth): @sio.on("user-join") async def user_join(sid, data): - print("user-join", sid, data) + # print("user-join", sid, data) auth = data["auth"] if "auth" in data else None if not auth or "token" not in auth: @@ -67,7 +67,7 @@ async def user_join(sid, data): else: USER_POOL[user.id] = [sid] - print(f"user {user.name}({user.id}) connected with session ID {sid}") + # print(f"user {user.name}({user.id}) connected with session ID {sid}") await sio.emit("user-count", {"count": len(set(USER_POOL))}) @@ -116,7 +116,7 @@ async def remove_after_timeout(sid, model_id): try: await asyncio.sleep(TIMEOUT_DURATION) if model_id in USAGE_POOL: - print(USAGE_POOL[model_id]["sids"]) + # print(USAGE_POOL[model_id]["sids"]) USAGE_POOL[model_id]["sids"].remove(sid) USAGE_POOL[model_id]["sids"] = list(set(USAGE_POOL[model_id]["sids"])) @@ -143,7 +143,8 @@ async def disconnect(sid): await sio.emit("user-count", {"count": len(USER_POOL)}) else: - print(f"Unknown session ID {sid} disconnected") + pass + # print(f"Unknown session ID {sid} disconnected") def get_event_emitter(request_info):