Selaa lähdekoodia

注释异步推送方式

locky 1 vuosi sitten
vanhempi
commit
a96c45912e
1 muutettua tiedostoa jossa 15 lisäystä ja 6 poistoa
  1. 15 6
      Controller/DetectControllerV2.py

+ 15 - 6
Controller/DetectControllerV2.py

@@ -125,12 +125,21 @@ class NotificationV2View(View):
                       'dealings_type': dealings_type, 'detection': detection,
                       'app_push_config': uid_set_push_list[0]['uid_set__msg_notify']}
 
-            # 异步推送消息和保存数据
-            push_thread = threading.Thread(
-                target=push_and_save_data,
-                args=(uid_set_push_list, is_sys_msg),
-                kwargs=params)
-            push_thread.start()
+            # 推送消息,生成推送数据列表
+            result = DevicePushService.save_msg_push(uid_set_push_list, **params)
+            # 保存推送数据
+            DevicePushService.save_sys_msg(
+                is_sys_msg,
+                result['local_date_time'],
+                result['sys_msg_list'],
+                result['new_device_info_list'])
+
+            # # 异步推送消息和保存数据
+            # push_thread = threading.Thread(
+            #     target=push_and_save_data,
+            #     args=(uid_set_push_list, is_sys_msg),
+            #     kwargs=params)
+            # push_thread.start()
 
             params['aws_s3_client'] = aws_s3_client
             params['uid_set_push_list'] = uid_set_push_list