|
@@ -124,16 +124,9 @@ class NotificationView(View):
|
|
|
if have_dkey:
|
|
|
detect_med_type = 1
|
|
|
detect_med_type = 2
|
|
|
-
|
|
|
- # if detect_group:
|
|
|
- # detect_group_list = detect_group.split(',')
|
|
|
- # detect_med_type = 1
|
|
|
- # if not have_dkey:
|
|
|
- # # 限制时间内,1分钟外,存库,不推消息
|
|
|
- # detect_med_type = 2
|
|
|
- # if event_type in detect_group_list:
|
|
|
- # redisObj.set_data(key=dkey, val=1, expire=detect_interval)
|
|
|
-
|
|
|
+ detect_group_list = detect_group.split(',')
|
|
|
+ if event_type in detect_group_list:
|
|
|
+ redisObj.set_data(key=dkey, val=1, expire=detect_interval)
|
|
|
|
|
|
auth = oss2.Auth(OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET)
|
|
|
bucket = oss2.Bucket(auth, 'oss-cn-shenzhen.aliyuncs.com', 'apg')
|
|
@@ -168,7 +161,7 @@ class NotificationView(View):
|
|
|
kwag_args['msg_text'] = msg_text
|
|
|
# 第一次进来,才推送
|
|
|
print("第一次进来推送")
|
|
|
- if detect_group == 2 or detect_group == 0:
|
|
|
+ if detect_med_type == 2 or detect_med_type == 0:
|
|
|
if push_type == 0: # ios apns
|
|
|
self.do_apns(**kwag_args)
|
|
|
elif push_type == 1: # android gcm
|