Sha256: eadc2bc5fd9b7a23c00a4ccf11db1b542a9542b0cce8a134eef86ed9fa5e690c
Contents?: true
Size: 1.39 KB
Versions: 1
Compression:
Stored size: 1.39 KB
Contents
# resque-async\_deliver resque-async\_deliver is a simple gem to send emails asynchronously using [Resque](https://github.com/defunkt/resque) without having to change much in your existing codebase. ## Installing In your Gemfile: ```ruby gem 'resque-async_deliver' ``` ## Usage Whenever you want to asynchronously send an email, simply change ```ruby SomeMailer.some_mail(an_argument, another_argument).deliver ``` to this ```ruby SomeMailer.async_deliver.some_mail(an_argument, another_argument) ``` This will enqueue a job that will simply run ```ruby SomeMailer.some_mail(an_argument, another_argument).deliver ``` You don't have to change your mailers, even if they take ActiveRecord objects as arguments. Since all the arguments will be JSON encoded by Resque before storing them in Redis, ActiveRecord objects will be serialized as a hash containing the class and the id of the model. resque-async\_deliver will then `find` the records and pass them to the mailer. The jobs will be added to Resque in the `mail` queue. ## Details Tested on ruby 1.8.7 and 1.9.2. ## Contributing 1. Fork 2. Create a topic branch 3. Push to your branch 4. Send a pull request ## Author Philipe Fatio <philipe.fatio@gmail.com> [@fphilipe](http://twitter.com/fphilipe) [](https://bitdeli.com/free "Bitdeli Badge")
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
resque-async_deliver-1.3.0 | README.md |