ws
This commit is contained in:
parent
cf64c36d33
commit
0d8d1fd75a
@ -66,6 +66,7 @@ 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 = read(id=id)
|
active_connections = read(id=id)
|
||||||
|
print("===================", type(active_connections.id), active_connections.id)
|
||||||
print("===================", type(active_connections.ws), active_connections.ws[0])
|
print("===================", type(active_connections.ws), active_connections.ws[0])
|
||||||
for connection in active_connections.ws:
|
for connection in active_connections.ws:
|
||||||
try:
|
try:
|
||||||
@ -98,7 +99,7 @@ class WsFile:
|
|||||||
self.ws = ws
|
self.ws = ws
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
pickled = {"id": self.id, "ws": self.ws}
|
pickled = {"id": self.id}
|
||||||
return pickled
|
return pickled
|
||||||
|
|
||||||
def __setstate(self, pickled_dict):
|
def __setstate(self, pickled_dict):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user