|
@@ -138,10 +138,12 @@ class PushObject:
|
|
mutable_content=True)
|
|
mutable_content=True)
|
|
n = apns2.Notification(payload=payload, priority=apns2.PRIORITY_LOW)
|
|
n = apns2.Notification(payload=payload, priority=apns2.PRIORITY_LOW)
|
|
res = cli.push(n=n, device_token=token_val, topic=app_bundle_id)
|
|
res = cli.push(n=n, device_token=token_val, topic=app_bundle_id)
|
|
- assert res.status_code == 200 or res.status_code == 410
|
|
|
|
|
|
+ if res.status_code != 200 and res.status_code != 410:
|
|
|
|
+ LOGGER.info('{}IOS推送响应异常: 状态码: {}'.format(uid, res.status_code))
|
|
return True
|
|
return True
|
|
except Exception as e:
|
|
except Exception as e:
|
|
- LOGGER.info('IOS推送异常: {}, 证书路径: {}'.format(repr(e), pem_path))
|
|
|
|
|
|
+ LOGGER.info('{}IOS推送异常:{},错误行数:{},证书路径: {}'.
|
|
|
|
+ format(uid, repr(e), e.__traceback__.tb_lineno, pem_path))
|
|
return False
|
|
return False
|
|
|
|
|
|
@staticmethod
|
|
@staticmethod
|