ws
This commit is contained in:
parent
c87233e81e
commit
fc265ad4f1
@ -67,8 +67,8 @@ class WebsocketUtil:
|
|||||||
# 广播该项目的消息
|
# 广播该项目的消息
|
||||||
active_connections = read(id=id)
|
active_connections = read(id=id)
|
||||||
print("===================", type(active_connections.id), active_connections.id)
|
print("===================", type(active_connections.id), active_connections.id)
|
||||||
print("===================", type(active_connections.ws), active_connections.ws[0])
|
print("===================", type(active_connections.getWs()), active_connections.getWs()[0])
|
||||||
for connection in active_connections.ws:
|
for connection in active_connections.getWs():
|
||||||
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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user