|
@@ -60,7 +60,7 @@ class NotificationV2View(View):
|
|
|
is_st = int(is_st)
|
|
|
region = int(region)
|
|
|
event_type = int(event_type)
|
|
|
- redis_obj = RedisObject()
|
|
|
+ redis_obj_pipe = RedisObject().pipe
|
|
|
redis_r_obj = RedisObject(mode='r')
|
|
|
try:
|
|
|
uid = DevicePushService.decode_uid(etk, uidToken)
|
|
@@ -82,7 +82,6 @@ class NotificationV2View(View):
|
|
|
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) # 当缓存不存在限流数据 重新设置一分钟请求一次
|
|
|
- redis_obj.close()
|
|
|
|
|
|
# 查询uid_push和uid_set数据
|
|
|
uid_push_qs = DevicePushService.query_uid_push(uid, event_type)
|