mirror of
https://github.com/open-webui/computer.git
synced 2026-12-05 11:07:56 -05:00
refac
This commit is contained in:
1 parent
75bf359f73
commit
8d28277288
25 files changed
+1323
-231
No files matched your search
@@ -55,6 +55,11 @@ async def emit_to_user(user_id: str, data: dict):
|
||||
await sio.emit("events:chat", data, to=sid)
|
||||
|
||||
|
||||
def is_user_active(user_id: str) -> bool:
|
||||
"""Return True when the user has at least one connected app session."""
|
||||
return bool(_user_sids.get(user_id))
|
||||
|
||||
|
||||
def get_asgi_app(other_app):
|
||||
"""Wrap a FastAPI/Starlette app with the Socket.IO ASGI layer."""
|
||||
return socketio.ASGIApp(sio, other_asgi_app=other_app)
|
||||
Reference in new issue
Block a user