Przeglądaj źródła

一键通话不限流

peng 2 lat temu
rodzic
commit
cbfedd573d
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      Controller/DetectControllerV2.py

+ 3 - 2
Controller/DetectControllerV2.py

@@ -86,8 +86,9 @@ class NotificationV2View(View):
             cache_app_push = redisObj.get_data(key=push_interval)  # 获取APP推送消息时间间隔缓存数据
             logger.info('消息推送- 限流key: {}, 推送间隔key: {}'.
                         format(cache_req_limiting, cache_app_push))
-            if cache_req_limiting:  # 限流存在则直接返回
-                return JsonResponse(status=200, data={'code': 0, 'msg': 'Push again in one minute'})
+            if event_type != '606':
+                if cache_req_limiting:  # 限流存在则直接返回
+                    return JsonResponse(status=200, data={'code': 0, 'msg': 'Push again in one minute'})
             redisObj.set_data(key=req_limiting, val=1, expire=60)  # 当缓存不存在限流数据 重新设置一分钟请求一次
             uid_push_qs = DevicePushService.query_uid_push(uid)  # 查询uid_set与push数据列表
             if not uid_push_qs.exists():