Closed zacid closed 9 years ago
Hello, @zac156! You need to use enhanced mode to track errors. But Enhanced mode doesn't work with frames #103 #90 #92. So I guess it is better not to use frames, but track errors with Enhanced mode.
Thanks @denisov , does that mean that I'll have to send PNs one by one? Wouldn't this process prove to be quite as then I'd be opening and closing the socket connection each time I send an individual PN?
Thanks for your help so far!
@zac156 PyAPNs will try to RE-USE socket connection as much as possible if you are sending PN with the same instance
apns = APNs(use_sandbox=True, cert_file='cert.pem', key_file='key.pem')
...
apns.gateway_server.send_notification(token_hex, payload)
apns.gateway_server.send_notification(token_hex, payload)
apns.gateway_server.send_notification(token_hex, payload)
FYR.
This is more of a support request than a bug, I am closing.
When using a frame to send many PNs how would I keep track when a specific PN fails? I.E. if I have a list of 1000 tokens I need to send to and a failure occurs on token number 556 how do I resume the sending of PNs by skipping 556 and continuing with 557?
Is this possible at all? I know that I can check the feedback service for invalid tokens before sending but it's not always that a token has been invalidated before sending, often another kind of error can occur to halt the send_notification_multiple process.
Any feedback would be greatly appreciated.
Thanks!