|
@@ -76,9 +76,9 @@ class NotificationV2View(View):
|
|
|
req_limiting = '{}_{}_{}_ptl'.format(uid, channel, event_type)
|
|
|
cache_req_limiting = redis_obj.get_data(key=req_limiting) # 获取请求限流缓存数据
|
|
|
cache_app_push = redis_obj.get_data(key=push_interval) # 获取APP推送消息时间间隔缓存数据
|
|
|
- # if event_type not in [606, 607]:
|
|
|
- # if cache_req_limiting: # 限流存在则直接返回
|
|
|
- # return JsonResponse(status=200, data={'code': 0, 'msg': 'Push again in one minute'})
|
|
|
+ if event_type not in [606, 607]:
|
|
|
+ if cache_req_limiting: # 限流存在则直接返回
|
|
|
+ return JsonResponse(status=200, data={'code': 0, 'msg': 'Push again in one minute'})
|
|
|
redis_obj.set_data(key=req_limiting, val=1, expire=60) # 当缓存不存在限流数据 重新设置一分钟请求一次
|
|
|
|
|
|
# 查询uid_push和uid_set数据
|