Giter Club home page Giter Club logo

Comments (7)

vanstee avatar vanstee commented on May 26, 2024

I'm going to guess that you're talking about using this with a webapp (probably Rails). Queuing a background job with https://github.com/mperham/sidekiq or http://github.com/defunkt/resque to send the notification would probably be the best idea. Grocer, doesn't have any specific Railsyness that plugs right in, but it should be pretty easy to just queue up the notification job in some kind of after_commit hook or something.

It would probably be cool if we had a blog post about Grocer + Rails to like to.

Did that answer your question?

from grocer.

michaelperalta avatar michaelperalta commented on May 26, 2024

Yeah @vanstee that helps, I'll take a look at the two things you sent me. I'm surprised I haven't seen a more concise Grocer + Rails blog post like you've suggested. Feel like it could be very valuable for those trying to implement this sort of functionality. Thanks for the help!

from grocer.

vanstee avatar vanstee commented on May 26, 2024

@michaelperalta One side note. If you go the background job route, you'll probably want to make sure you open the connection in the parent process/thread. Apple specifically mentions not to open and close connections for each message. They identify it as a denial of service I think.

from grocer.

linjunpop avatar linjunpop commented on May 26, 2024

@vanstee I'm using Grocer on a Rails application with Sidekiq. Would you mind write a Wiki/Blog about the correct way to integrate Grocer with Sidekiq? Thanks. 😺

from grocer.

vanstee avatar vanstee commented on May 26, 2024

@linjunpop Totally. I'll try to find some time over the next few weeks.

from grocer.

michaelperalta avatar michaelperalta commented on May 26, 2024

Sounds great, definitely looking to implement this in my app soon so it would be very helpful. I appreciate it.

from grocer.

linjunpop avatar linjunpop commented on May 26, 2024

@vanstee Do you wanna have a look at this? https://gist.github.com/linjunpop/5202365, Thanks 😺

from grocer.

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.