raix-push
raix-push copied to clipboard
_raix_push_notifications stopped being processed
First of all - GREAT plugin. Thank you Raix and other contributors for making this plugin possible!! Your hard work has had a positive impact on my application.
I noticed push notifications weren't going through for my app and investigated. I saw that the _raix_push_notifications
collection had stopped being processed. Push notifications were going in but not coming out.
Looking at the code, I see the following inside a Meteor.setInterval
function:
// Set send fence
isSendingNotification = true;
// ....
// ....
isSendingNotification = false;
My question is, if an error occurred between true and false, would it disable the queue until service restart? I think it would as the fence flag off would not be triggered. Note that a service restart fixed my issue which is why I was thinking perhaps this is what happened.
My mongo server is on compose.io and I wonder if the inherent unreliability of networks makes this safe to use in hosted mongo scenarios.
Any thoughts?
I think this bit me again this week. I see stuck notifications _raix_push_notifications.
Am I thinking about the problem incorrectly?
@justinweinberg I'm also using compose.io and also investigating why notifications aren't being sent ...
If I restart my meteor app notifications start flowing again. Do yours?
I think the solution may be as simple as a try / finally around the fence. I'd fork and issue a pull request but I'm not clear on how to test this aside from going live and I'm not absolutely positive this is root cause.
Hey @justinweinberg notifications are mission critical, so I decided to roll my own meteor package from https://github.com/phonegap/phonegap-plugin-push
@justinweinberg You should make a PR. Your solution looks good and the same error is happening time to time here.