You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We send notifications to thousands of users, and there are a lot of TimeoutErrors being thrown by the library. I have looked through your code quite a bit and have noticed 2 strange things.
apns_async.py:383 the timeout is hardcoded to 1 second. I think this should be a property that can be set in the settings.
apns_async.py:336 i dont see the point of raising an error, because the errors are already available in the "results" variable. Raising an error just interrupts the whole flow, and does not even return the results variable which would allow us to mark users that have already received the message.
Furthermore, sending to thousands of users means that there will always be at least one registration_id that will be Unregistered, so the code will throw an error every single time. I dont think that having to run this code in a perpetual try:except should be the default way to implement it. It would work much smoother if you do not raise the error on line 336, or if you return the entire list of results with the exception so at least we can mark the successful users.
The text was updated successfully, but these errors were encountered:
Hi,
We send notifications to thousands of users, and there are a lot of TimeoutErrors being thrown by the library. I have looked through your code quite a bit and have noticed 2 strange things.
Furthermore, sending to thousands of users means that there will always be at least one registration_id that will be Unregistered, so the code will throw an error every single time. I dont think that having to run this code in a perpetual try:except should be the default way to implement it. It would work much smoother if you do not raise the error on line 336, or if you return the entire list of results with the exception so at least we can mark the successful users.
The text was updated successfully, but these errors were encountered: