GithubHelp home page GithubHelp logo

Comments (9)

ileitch avatar ileitch commented on August 14, 2024

Yes I'd like to add this ability. My concerns are:

  1. Keep rapns simple to setup for users with only a single app/certificate.
  2. 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.

kuon avatar kuon commented on August 14, 2024

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.

ileitch avatar ileitch commented on August 14, 2024

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.

kuon avatar kuon commented on August 14, 2024

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.

ileitch avatar ileitch commented on August 14, 2024

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.

kuon avatar kuon commented on August 14, 2024

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.

EpicDraws avatar EpicDraws commented on August 14, 2024

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.

ileitch avatar ileitch commented on August 14, 2024

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.

ileitch avatar ileitch commented on August 14, 2024

This is now supported in 2.0.0.

from rapns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.