|
@@ -373,7 +373,6 @@ class DevicePushService:
|
|
e_type = event_type[len_type - 1 - i]
|
|
e_type = event_type[len_type - 1 - i]
|
|
if e_type == '1':
|
|
if e_type == '1':
|
|
types.append(str(ALGORITHM_COMBO_TYPES[i]))
|
|
types.append(str(ALGORITHM_COMBO_TYPES[i]))
|
|
- LOGGING.info('算法对照打印:{}'.format(ALGORITHM_COMBO_TYPES))
|
|
|
|
return types
|
|
return types
|
|
except Exception as e:
|
|
except Exception as e:
|
|
LOGGING.info('推送错误异常,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
LOGGING.info('推送错误异常,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
@@ -691,7 +690,6 @@ class DevicePushService:
|
|
}
|
|
}
|
|
response = requests.post(url, data=data, headers=headers)
|
|
response = requests.post(url, data=data, headers=headers)
|
|
if response.status_code == 200:
|
|
if response.status_code == 200:
|
|
- LOGGING.info('uid:{},时间:{}小米推送结果:{}'.format(uid, n_time, response.json()))
|
|
|
|
return True
|
|
return True
|
|
ERROR_INFO_LOGGER.info('小米推送异常,uid:{},状态码{},时间:{},结果:{},'
|
|
ERROR_INFO_LOGGER.info('小米推送异常,uid:{},状态码{},时间:{},结果:{},'
|
|
.format(uid, response.status_code, n_time, response.json()))
|
|
.format(uid, response.status_code, n_time, response.json()))
|
|
@@ -754,8 +752,6 @@ class DevicePushService:
|
|
|
|
|
|
response = requests.post(push_url, data=push_data, headers=headers)
|
|
response = requests.post(push_url, data=push_data, headers=headers)
|
|
if response.status_code == 200:
|
|
if response.status_code == 200:
|
|
- LOGGING.info(
|
|
|
|
- "oppo推送返回值:{},uid:{},time:{},event:{}".format(response.json(), uid, now_time, event_type))
|
|
|
|
if event_type in [606, 607]:
|
|
if event_type in [606, 607]:
|
|
PushObject.jpush_transparent_transmission(msg_title, msg_text, appBundleId, jg_token_val,
|
|
PushObject.jpush_transparent_transmission(msg_title, msg_text, appBundleId, jg_token_val,
|
|
extra_data)
|
|
extra_data)
|
|
@@ -987,9 +983,6 @@ class DevicePushService:
|
|
@return: True|False
|
|
@return: True|False
|
|
"""
|
|
"""
|
|
try:
|
|
try:
|
|
- LOGGING.info(
|
|
|
|
- 'is_send_app_push函数参数打印:uid:{},event_type:{},event_tag:{},msg_interval:{}'.format(
|
|
|
|
- uid, event_type, event_tag, msg_interval))
|
|
|
|
if not app_push_config:
|
|
if not app_push_config:
|
|
return True
|
|
return True
|
|
|
|
|
|
@@ -1012,11 +1005,9 @@ class DevicePushService:
|
|
push_time_config = app_push_config['pushTime']
|
|
push_time_config = app_push_config['pushTime']
|
|
# 计算当前时间是否在自定义消息提醒范围内
|
|
# 计算当前时间是否在自定义消息提醒范围内
|
|
if not DevicePushService.is_push_notify_allowed_now(push_time_config):
|
|
if not DevicePushService.is_push_notify_allowed_now(push_time_config):
|
|
- LOGGING.info('{}APP推送提醒不在自定义时间内:{}'.format(uid, push_time_config))
|
|
|
|
return False
|
|
return False
|
|
# APP接收提醒,判断识别类型是否勾选提醒
|
|
# APP接收提醒,判断识别类型是否勾选提醒
|
|
push_result = DevicePushService.is_type_push(event_type, event_tag, app_event_types)
|
|
push_result = DevicePushService.is_type_push(event_type, event_tag, app_event_types)
|
|
- LOGGING.info('{}APP推送消息类型提醒是否执行:{}'.format(uid, push_result))
|
|
|
|
return push_result
|
|
return push_result
|
|
except Exception as e:
|
|
except Exception as e:
|
|
LOGGING.info(
|
|
LOGGING.info(
|