user2553863
user2553863

Reputation: 782

How to retry rpush notifications in ruby?

I'm trying to use Rpush gem on Ruby on Rails to send some notifications through GCM.

It works pretty well, though I've had some 503 Bad Gateway errors, Google recommends retrying those, but I don't know how should I retry the sending of those messages with Rpush.

Rpush's docs says rpush retries, but the retry counter is 0 in the notifications table, and the retry_after field is empty.

I am not running Rpush as a daemon for now, I just invoke Rpush.push after I create a message. Since it is a development setup, I might be sending at most 4 messages per minute.

I can't find documentation about the procedure to retry. Am I missing something?

Regards.

Upvotes: 2

Views: 365

Answers (1)

igneus
igneus

Reputation: 1002

If you are using Rpush.push instead of a daemon, you will have to execute it not only on message creation, but also periodically to retry failed notifications.

Upvotes: 1

Related Questions