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
{{ message }}
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.
It would be nice if you could set somewhere the database to use by rapns.
I'm working on some projects and all of them are going to use rapns on the same machine, and my problem comes with the "only 1 instance of rapns" restriction.
My solution: I have a "master" rails app which I only use to configure and start rapns (daemon mode, e.g. "$ rapns production"). This app connects to the "rapns" database.
My other apps have their own database, and also access the rapns one. When I have to send a notification, I'm having to specify the rapns database connection with something like:
Could you make a simple API in your "master" app (the one with the rapns database) so the other apps simply make a HTTP request to it, and it's controller action is to save the notification so rapns can send it?
Hi,
It would be nice if you could set somewhere the database to use by rapns.
I'm working on some projects and all of them are going to use rapns on the same machine, and my problem comes with the "only 1 instance of rapns" restriction.
My solution: I have a "master" rails app which I only use to configure and start rapns (daemon mode, e.g. "$ rapns production"). This app connects to the "rapns" database.
My other apps have their own database, and also access the rapns one. When I have to send a notification, I'm having to specify the rapns database connection with something like:
Rapns::App.establish_connection "rapns_#{Rails.env}"
Rapns::Notification.establish_connection "rapns_#{Rails.env}"
before creating the notification, to let ActiveRecord to find rapns classes.
So it would be great if you could specify somewhere the database configuration where rapns model objects live, in the initializer, for instance.
The text was updated successfully, but these errors were encountered: