|
@@ -113,13 +113,18 @@ class NotificationView(View):
|
|
detect_med_type = 1
|
|
detect_med_type = 1
|
|
else:
|
|
else:
|
|
detect_med_type = 2
|
|
detect_med_type = 2
|
|
- detect_group_list = detect_group.split(',')
|
|
|
|
- if event_type in detect_group_list:
|
|
|
|
- if detect_interval < 60:
|
|
|
|
- detect_interval = 60
|
|
|
|
|
|
+ # detect_group=0允许全部推送的时候
|
|
|
|
+ if detect_group == '0':
|
|
redisObj.set_data(key=dkey, val=1, expire=detect_interval)
|
|
redisObj.set_data(key=dkey, val=1, expire=detect_interval)
|
|
|
|
+ else:
|
|
|
|
+ detect_group_list = detect_group.split(',')
|
|
|
|
+ if event_type in detect_group_list:
|
|
|
|
+ if detect_interval < 60:
|
|
|
|
+ detect_interval = 60
|
|
|
|
+ redisObj.set_data(key=dkey, val=1, expire=detect_interval)
|
|
redisObj.set_data(key=pkey, val=1, expire=60)
|
|
redisObj.set_data(key=pkey, val=1, expire=60)
|
|
- # 旧模式并且没有pkey,重新创建一个
|
|
|
|
|
|
+
|
|
|
|
+ # 旧模式并且没有pkey,重新创建一个
|
|
if not detect_group and not have_pkey:
|
|
if not detect_group and not have_pkey:
|
|
# 设置推送时间为60秒一次
|
|
# 设置推送时间为60秒一次
|
|
redisObj.set_data(key=pkey, val=1, expire=60)
|
|
redisObj.set_data(key=pkey, val=1, expire=60)
|