This commit is contained in:
JIAKUNHAO 2022-11-24 16:52:54 +08:00
parent 4ef8d20582
commit 41ad806469

View File

@ -60,8 +60,8 @@ class WebsocketUtil:
def send_message_proj_json(self, message: Union[str, int, List, Dict], id: str): def send_message_proj_json(self, message: Union[str, int, List, Dict], id: str):
# 广播该项目的消息 # 广播该项目的消息
active_connections_dist = read(id=id) active_connections = read(id=id)
for connection in active_connections_dist[id]: for connection in active_connections:
try: try:
connection.send(json.dumps(message, cls=MyEncoder, indent=4), ) connection.send(json.dumps(message, cls=MyEncoder, indent=4), )
except Exception as e: except Exception as e: