|
@@ -24,6 +24,7 @@ from pyfcm import FCMNotification
|
|
|
|
|
|
from AnsjerPush.config import OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET, JPUSH_CONFIG, FCM_CONFIG, \
|
|
|
APNS_CONFIG, BASE_DIR, APNS_MODE
|
|
|
+from AnsjerPush.config import SERVER_TYPE
|
|
|
from Model.models import UidPushModel, SysMsgModel
|
|
|
from Object.ETkObject import ETkObject
|
|
|
from Object.RedisObject import RedisObject
|
|
@@ -120,11 +121,11 @@ class NotificationView(View):
|
|
|
detect_med_type = 1 # 1为存库不推送
|
|
|
else:
|
|
|
detect_med_type = 2 # 为2的话,既推送,又存库
|
|
|
- # detect_group=0允许全部推送的时候
|
|
|
- new_detect_interval = uid_push_list[0]['uid_set__new_detect_interval']
|
|
|
- detect_interval = new_detect_interval if new_detect_interval > 0 else detect_interval
|
|
|
- detect_interval = 60 if detect_interval < 60 else detect_interval
|
|
|
- redisObj.set_data(key=dkey, val=1, expire=detect_interval-5)
|
|
|
+ if SERVER_TYPE != 'Ansjer.cn_formal_settings':
|
|
|
+ new_detect_interval = uid_push_list[0]['uid_set__new_detect_interval']
|
|
|
+ detect_interval = new_detect_interval if new_detect_interval > 0 else detect_interval
|
|
|
+ detect_interval = 60 if detect_interval < 60 else detect_interval
|
|
|
+ redisObj.set_data(key=dkey, val=1, expire=detect_interval - 5)
|
|
|
redisObj.set_data(key=pkey, val=1, expire=60)
|
|
|
logger.info('APP消息推送V1接口,是否进行APP推送:{},1为不推送,间隔:{}'.format(detect_med_type, detect_interval))
|
|
|
# 旧模式并且没有pkey,重新创建一个
|