|
@@ -79,13 +79,13 @@ 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, 515]:
|
|
|
+ if event_type not in [606, 607, 1023]:
|
|
|
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) # 当缓存不存在限流数据 重新设置一分钟请求一次
|
|
|
|
|
|
# OZI定制客户儿童保护模式
|
|
|
- child_protection = event_type == 515 and detection == 0
|
|
|
+ child_protection = event_type == 1023 and detection == 0
|
|
|
# 查询uid_push和uid_set数据
|
|
|
if child_protection:
|
|
|
uid_push_qs = DevicePushService.get_uid_push_by_uid(uid) # 查主用户
|
|
@@ -106,7 +106,7 @@ class NotificationV2View(View):
|
|
|
|
|
|
# APP消息提醒推送间隔
|
|
|
detect_interval = uid_set_push_list[0]['uid_set__detect_interval']
|
|
|
- if event_type not in [606, 607, 515]:
|
|
|
+ if event_type not in [606, 607, 1023]:
|
|
|
if not cache_app_push:
|
|
|
# 缓存APP提醒推送间隔 默认1分钟提醒一次
|
|
|
DevicePushService.cache_push_detect_interval(redis_obj, push_interval, detect_interval,
|