Comments (9)
Yes I'd like to add this ability. My concerns are:
- Keep rapns simple to setup for users with only a single app/certificate.
- Make the upgrade process painless (I assume these changes will require changes to the rapns.yml layout).
Also, this may not be the case for your application. But I'd like to investigate decoupling rapns from Rails as part of this. Some users wanting this feature may have multiple Rails applications, but will require only a single rapns daemon. Having to deploy one of those Rails apps just to house rapns makes for a rather awkward deployment process.
I'll investigate this further over the next couple of days.
from rapns.
I guess the easiest way for decoupling would be to provide a backend class to store the notifications, having perhaps a file based backend in addition to the activerecord backend. The backend class would implement something like save(notification)
and dequeue
. Then the notification object would become a simple Object
subclass wrapping the notification info.
Anyway thanks for looking into this, if I can help, just let me know.
from rapns.
I have just pushed multi-app support to master. Would you also give it a try?
To configure your apps you add a section to rapns.yml, e.g:
app1:
certificate: production.pem
certificate_password:
connections: 3
app2:
certificate: production.pem
certificate_password:
connections: 3
n = Rapns::Notification.new
n.app = "app1"
...
from rapns.
Would it be possible to specify the config at runtime? Our certificates live in the db.
Sent from my iPhone
On 12 juin 2012, at 07:15, Ian [email protected] wrote:
I have just pushed multi-app support to master. Would you also give it a try?
To configure your apps you add a section to rapns.yml, e.g:
app1: certificate: production.pem certificate_password: connections: 3 app2: certificate: production.pem certificate_password: connections: 3
n = Rapns::Notification.new n.app = "app1" ...
Reply to this email directly or view it on GitHub:
#40 (comment)
from rapns.
OK, I have now change master to read App configuration from the database.
app = Rapns::App.new
app.key = 'my_app'
app.environment = 'production'
app.certificate = File.read('production.pem')
Please give it a try. I'm also thinking it'd be nice to monitor Rapns::App and start/stop delivery handlers as needed.
from rapns.
Great.
I am working on another project for a few day, but I'll be back on the rails application very soon. I'll try that fully then.
Nicolas Goy
Programmer
Goyman.com SA
Versvey 57
1853 Yvorne
SWITZERLAND
Phone: +41 21 535 31 13
Mobile: +41 79 935 68 93
On Wednesday, 13 June 2012 at 00:51, Ian Leitch wrote:
OK, I have now change master to read App configuration from the database.
app = Rapns::App.new app.key = 'my_app' app.environment = 'production' app.certificate = File.read('production.pem')
Please give it a try. I'm also thinking it'd be nice to monitor Rapns::App and start/stop delivery handlers as needed.
Reply to this email directly or view it on GitHub:
#40 (comment)
from rapns.
What is the full format for specifying multiple apps in rapns.yml? I tried to simply add the app sections inline to no avail.
from rapns.
I've changed that, apps are now added by creating an Rapns::App. See the readme.
Note that this functionality in only in mater currently, not a gem.
from rapns.
This is now supported in 2.0.0.
from rapns.
Related Issues (20)
- Update at the end HOT 2
- Rapns Worker stalls and not setting notifications as delivered HOT 8
- Multiple databases support HOT 2
- Trying Rapns with Safari Push HOT 10
- NoMethodError raised when GCM post responds with 500
- add notification table HOT 4
- Rapns daemon process get killed HOT 4
- [ERROR] NoMethodError, undefined method `to_binary' for Rapns::Notification HOT 4
- GCM returns an error for messages with Spanish characters
- new release? HOT 5
- fatal: deadlock detected HOT 1
- fatal: deadlock detected
- ActiveRecord::ConnectionTimeoutError HOT 3
- NameError, uninitialized constant Rapns::Daemon::Apn HOT 3
- Notification received on the phone but the rapns_notifications database still list the notification as not delivered
- apns slow HOT 2
- Testing github-issues-import.
- Best practise for maintaining rapns_notifications table.
- Certificate has been revoked (Rails Console & Controller both) HOT 1
- @app should be @app.name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rapns.