fix broadcast
This commit is contained in:
parent
6ebf34c4a9
commit
4e1f1b6f20
8
app.py
8
app.py
@ -26,11 +26,11 @@ async def set_variable(project_id,var):
|
||||
if not vars.get(project_id,''):
|
||||
vars[project_id] = {}
|
||||
vars[project_id][var.get('name','')] = var.get('value','')
|
||||
await websockets.broadcast(clients.get(project_id,[]),json.dumps(var))
|
||||
websockets.broadcast(clients.get(project_id,[]),json.dumps(var))
|
||||
|
||||
async def disconnect(project_id,user):
|
||||
print("disconnecting",user)
|
||||
clients.get(project_id,[]).pop(user)
|
||||
async def disconnect(project_id,ws):
|
||||
print(f"disconnecting {ws.host}:{ws.port}")
|
||||
clients.get(project_id,[]).remove(ws)
|
||||
|
||||
|
||||
async def process(ws, path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user