fix broadcast
This commit is contained in:
		
							
								
								
									
										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): | ||||
|  | ||||
		Reference in New Issue
	
	Block a user