-
Notifications
You must be signed in to change notification settings - Fork 92
Add reflection for GCM NotRegistered errors, and other errors that imply an invalid registration id. #171
Add reflection for GCM NotRegistered errors, and other errors that imply an invalid registration id. #171
Conversation
…ply an invalid registration id. Fixes ileitch#162.
Very interested in using your patch - wish the specs weren't failing! Maybe I should just install your forked code... |
Looking at the Travis build history its failing across all pull requests not just mine. If there is something specific to my patch I'd be happy to fix it. |
…gistered-errors Add reflection for GCM NotRegistered errors, and other errors that imply an invalid registration id.
I am trying to instrument Rapns via NewRelic using the most recent code, specifically to record counts of success and failure rates for notification-recipients. There is one case that I am having trouble with. I was hoping you could correct my assumptions or guide me in the right direction. When a GCM batched notification is marked as failed and Reflections#notification_failed is called, the recipients fall into one of three groups: Before this pull request it was possible (though not ideal) to get this number by subtracting errors (parsed from the error string) from total recipients in a failed notification. Now that they are split into three groups this is no longer possible. For our Rapns use case, at least, it would be more useful to have success and failure (and enqueue perhaps) reflections called for individual notification-recipients for batched GCM notifications. Currently it is somewhat inconsistent... |
I would add a line below the multi_json_load line in Rapns::Daemon::Gcm::Delivery#ok and extract the values there (ideally using a reflection). It would be good to create a matching reflection for Apn deliveries. |
I was thinking about how to implement your suggestion and came across another issue: |
The way I understand it from this http://developer.android.com/google/gcm/adv.html#canonical, these messages are still delivered. I didn't really change this path except to add handle_canonical_ids at the end. |
As to the second point, if a batch has both canonical_ids and non-invalid-registration_id failures, it throws a DeliveryError in handle_errors() and never gets to handle_canonical_ids(), right? This has nothing to do with this pull request - just bouncing it off you because you seem knowledgeable :o) |
I made a pull request to fix this. Do you mind taking a look? #180 |
No description provided.