Browse Source

优化推送打印

zhangdongming 2 years ago
parent
commit
8d49ec9364

+ 1 - 2
Controller/DetectControllerV2.py

@@ -37,7 +37,6 @@ class NotificationV2View(View):
         @param request_dict:detection 检测类型 0:普通,1:算法
         """
         logger = logging.getLogger('info')
-        logger.info('移动侦测V2接口参数:{}'.format(request_dict))
         uidToken = request_dict.get('uidToken', None)
         etk = request_dict.get('etk', None)
         channel = request_dict.get('channel', '1')
@@ -63,7 +62,7 @@ class NotificationV2View(View):
             uid = DevicePushService.decode_uid(etk, uidToken)
             if len(uid) != 20 and len(uid) != 14:
                 return JsonResponse(status=200, data={'code': 404, 'msg': 'wrong uid'})
-
+            logger.info('消息推送V2****uid{}'.format(uid))
             # 判断是否为系统消息
             is_sys_msg = DevicePushService.judge_sys_msg(int(event_type))
             if is_sys_msg:

+ 0 - 5
Object/utils/LocalDateTimeUtil.py

@@ -64,15 +64,10 @@ def date_to_week(str_date):
     @param str_date 日期 例:2022-03-03
     @return: int 1-7
     """
-    logger = logging.getLogger('info')
     if str_date:
-        logger.info('-----进入日期转星期-----')
         dt = pendulum.parse(str_date).day_of_week
         dt = 7 if dt == 0 else dt
-        logger.info('---根据pendulum模块解析后=星期{}'.format(dt))
         return dt
     return datetime.datetime.now().weekday() + 1
 
 
-if __name__ == "__main__":
-    print('')

+ 0 - 1
Service/EquipmentInfoService.py

@@ -27,7 +27,6 @@ class EquipmentInfoService:
         """
         logger = logging.getLogger('info')
         week = LocalDateTimeUtil.date_to_week(dt)
-        logger.info('本周{}'.format(str(week)))
         equipment_info = None
         if week == 1:
             equipment_info = EquipmentInfoMonday(**kwargs)