This commit is contained in:
aqu415
2022-02-21 21:15:59 +08:00
parent f5b42e6f5f
commit 49b1f0d7d7
4 changed files with 61 additions and 36 deletions
+1
View File
@@ -14,6 +14,7 @@ class CooperationMindLogLib(object):
if self.should_handle(json_msg):
# 避免json解析失败
json_msg = json_msg.replace(',null]', ']')
print(json_msg)
json_msg_dict = ast.literal_eval(json_msg)
log = CooperationMindLog(
-1
View File
@@ -28,7 +28,6 @@ class ChatConsumer(WebsocketConsumer):
# Receive message from WebSocket
def receive(self, text_data):
# Send message to room group
print(text_data)
log_dict = self.log_lib.save_log(text_data)
async_to_sync(self.channel_layer.group_send)(
self.room_group_name,