|
@@ -7,8 +7,8 @@ from django.views.generic.base import View
|
|
|
|
|
|
from AnsjerPush.config import CONFIG_EUR, CONFIG_INFO, CONFIG_US, UNRESTRICTED_FREQUENCY_PUSH_EVENT_TYPE_LIST
|
|
|
from Object.RedisObject import RedisObject
|
|
|
+from Object.enums.RedisKeyConstant import RedisKeyConstant
|
|
|
from Service.DevicePushService import DevicePushService
|
|
|
-from Object.enums.EventTypeEnum import EventTypeEnumObj
|
|
|
|
|
|
TIME_LOGGER = logging.getLogger('time')
|
|
|
ERROR_INFO_LOGGER = logging.getLogger('error_info')
|
|
@@ -136,6 +136,13 @@ class NotificationV2View(View):
|
|
|
storage_location = 3
|
|
|
elif CONFIG_INFO == CONFIG_EUR:
|
|
|
storage_location = 4
|
|
|
+ try:
|
|
|
+ config_key = RedisKeyConstant.PUSH_STORAGE_CONFIG_UID.value + uid
|
|
|
+ config_value = redis_obj.get_data(key=config_key)
|
|
|
+ if config_value: # 有配置则使用配置
|
|
|
+ storage_location = int(config_value)
|
|
|
+ except Exception as e:
|
|
|
+ TIME_LOGGER.error('获取缓存推送存储位置异常uid:{},error:{}'.format(uid, repr(e)))
|
|
|
else:
|
|
|
if storage_location is not None:
|
|
|
storage_location = int(storage_location)
|