Browse Source

移除不必要打印

zhangdongming 2 năm trước cách đây
mục cha
commit
5f31a40da2

+ 0 - 3
Controller/DetectController.py

@@ -109,8 +109,6 @@ class NotificationView(View):
                         detect_interval = 60 if detect_interval < 60 else detect_interval
                     redisObj.set_data(key=dkey, val=1, expire=detect_interval - 5)
                     redisObj.set_data(key=pkey, val=1, expire=60)
-            logger.info(
-                'APP消息推送V1接口,是否进行APP推送:{},1为不推送,间隔:{}'.format(detect_med_type, detect_interval))
             # 旧模式并且没有pkey,重新创建一个
             if not detect_group and not have_pkey:
                 redisObj.set_data(key=pkey, val=1, expire=60)
@@ -141,7 +139,6 @@ class NotificationView(View):
                     # 根据日期获得星期几
                     week = LocalDateTimeUtil.date_to_week(result['local_date_time'])
                     EquipmentInfoService.equipment_info_bulk_create(week, result['new_device_info_list'])
-                    logger.info('----《旧接口》设备信息分表批量保存end')
             if is_st == '0' or is_st == '2':
                 print("is_st=0or2")
                 for up in uid_push_list:

+ 0 - 2
Controller/DetectControllerV2.py

@@ -76,7 +76,6 @@ class NotificationV2View(View):
             req_limiting = '{uid}_{channel}_{event_type}_ptl'.format(uid=uid, channel=channel, event_type=event_type)
             cache_req_limiting = redis_obj.get_data(key=req_limiting)  # 获取请求限流缓存数据
             cache_app_push = redis_obj.get_data(key=push_interval)  # 获取APP推送消息时间间隔缓存数据
-            logger.info('V2推送 - 限流key: {}, 推送间隔key: {}'.format(cache_req_limiting, cache_app_push))
             if event_type != 606:
                 if cache_req_limiting:  # 限流存在则直接返回
                     return JsonResponse(status=200, data={'code': 0, 'msg': 'Push again in one minute'})
@@ -123,7 +122,6 @@ class NotificationV2View(View):
                       'electricity': electricity, 'bucket': bucket, 'aws_s3_client': aws_s3_client,
                       'app_push': cache_app_push, 'storage_location': 2, 'ai_type': ai_type, 'device_type': device_type,
                       'dealings_type': dealings_type, 'detection': detection}
-            logger.info('推送数据参数:{}'.format(params))
 
             # 推送消息,生成推送数据列表
             result = DevicePushService.save_msg_push(uid_set_push_list, **params)

+ 0 - 6
Service/DevicePushService.py

@@ -138,7 +138,6 @@ class DevicePushService:
             detect_interval = new_detect_interval if new_detect_interval > 0 else detect_interval
             detect_interval = 60 if detect_interval < 60 else detect_interval
         redis_obj.set_data(key=name, val=1, expire=detect_interval - 5)
-        LOGGING.info('消息推送-缓存设置APP推送间隔:{}s'.format(detect_interval))
 
     @classmethod
     def save_msg_push(cls, uid_set_push_list, **params):
@@ -177,11 +176,8 @@ class DevicePushService:
                 kwag_args['token_val'] = token_val
                 kwag_args['msg_title'] = msg_title
                 kwag_args['msg_text'] = msg_text
-                LOGGING.info('推送要的数据: {}'.format(kwag_args))
                 local_date_time = CommonService.get_now_time_str(n_time=params['n_time'], tz=tz, lang='cn')
-                LOGGING.info('<<<<<根据时区计算后日期={},时区={}'.format(local_date_time, tz))
                 local_date_time = local_date_time[0:10]
-                LOGGING.info('<<<<<切片后的日期={}'.format(local_date_time))
                 # 以下是存库
                 userID_id = up["userID_id"]
                 if userID_id not in userID_ids:
@@ -196,7 +192,6 @@ class DevicePushService:
                                                         updTime=now_time, uid=params['uid'],
                                                         eventType=params['event_type']))
                     else:
-                        LOGGING.info('分表存数据start------')
                         params['userID_id'] = userID_id
                         # push_permission = DevicePushService.check_share_permission(userID_id,
                         # params['channel'],params['uid'])
@@ -334,7 +329,6 @@ class DevicePushService:
                 # 根据日期获得星期几
                 week = LocalDateTimeUtil.date_to_week(local_date_time)
                 EquipmentInfoService.equipment_info_bulk_create(week, new_device_info_list)
-                LOGGING.info('设备信息分表批量保存end------')
         return True
 
     @classmethod