Browse Source

注释旧的推送逻辑,修改新推送代码

zhangdongming 3 years ago
parent
commit
bc567ea52d
1 changed files with 16 additions and 16 deletions
  1. 16 16
      Controller/DetectControllerV2.py

+ 16 - 16
Controller/DetectControllerV2.py

@@ -201,20 +201,20 @@ class NotificationView(View):
                             uid=uid,
                             eventType=event_type))
                     else:
-                        eq_list.append(Equipment_Info(
-                            userID_id=userID_id,
-                            eventTime=n_time,
-                            eventType=event_type,
-                            devUid=uid,
-                            devNickName=nickname,
-                            Channel=channel,
-                            alarm='Motion \tChannel:{channel}'.format(channel=channel),
-                            is_st=is_st,
-                            receiveTime=n_time,
-                            addTime=now_time,
-                            storage_location=2,
-                            borderCoords='',
-                        ))
+                        # eq_list.append(Equipment_Info(
+                        #     userID_id=userID_id,
+                        #     eventTime=n_time,
+                        #     eventType=event_type,
+                        #     devUid=uid,
+                        #     devNickName=nickname,
+                        #     Channel=channel,
+                        #     alarm='Motion \tChannel:{channel}'.format(channel=channel),
+                        #     is_st=is_st,
+                        #     receiveTime=n_time,
+                        #     addTime=now_time,
+                        #     storage_location=2,
+                        #     borderCoords='',
+                        # ))
                         # start 根据设备侦测时间为准进行分表存储数据
                         logger.info('分表存数据start------')
                         new_device_info_list.append(EquipmentInfoService.get_equipment_info_obj(
@@ -230,7 +230,7 @@ class NotificationView(View):
                             receive_time=n_time,
                             add_time=now_time,
                             storage_location=2,
-                            borderCoords='',
+                            border_coords='',
                         ))
                         # end
                     userID_ids.append(userID_id)
@@ -251,7 +251,7 @@ class NotificationView(View):
             if is_sys_msg:
                 SysMsgModel.objects.bulk_create(sys_msg_list)
             else:
-                Equipment_Info.objects.bulk_create(eq_list)
+                # Equipment_Info.objects.bulk_create(eq_list)
                 # new 分表批量存储 设备信息
                 if new_device_info_list and len(new_device_info_list) > 0:
                     # 根据日期获得星期几