|
@@ -569,7 +569,8 @@ class PushObject:
|
|
|
headers = {'Content-Type': 'application/json', 'Authorization': authorization_token,
|
|
|
'timestamp': str(int(time.time()) * 1000)}
|
|
|
extra_data = {'alert': 'Motion', 'msg': '', 'sound': 'sound.aif', 'zpush': '1',
|
|
|
- 'received_at': n_time, 'event_time': n_time, 'event_type': str(event_type), 'nickname': nickname,
|
|
|
+ 'received_at': n_time, 'event_time': n_time, 'event_type': str(event_type),
|
|
|
+ 'nickname': nickname,
|
|
|
'uid': uid, 'channel': channel, 'title': msg_title, 'body': msg_text
|
|
|
}
|
|
|
# 通知推送
|
|
@@ -624,6 +625,7 @@ class PushObject:
|
|
|
push.message = jpush.message(msg_content=msg_text, title=msg_title, extras=extra_data)
|
|
|
push.platform = jpush.all_
|
|
|
res = push.send()
|
|
|
- assert res.status_code == 200
|
|
|
+ LOGGER.info('极光透传,结果:{},参数:{}'.format(res, extra_data))
|
|
|
except Exception as e:
|
|
|
- return repr(e)
|
|
|
+ LOGGER.info('jpush_transparent_transmission极光透传异常:errLine:{}, errMsg:{}, 参数:{}'.format(
|
|
|
+ e.__traceback__.tb_lineno, repr(e), extra_data))
|