resque-async_deliver is a simple gem to send emails asynchronously using Resque without having to change much in your existing codebase.
In your Gemfile:
Whenever you want to asynchronously send an email, simply change
This will enqueue a job that will simply run
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
Tested on ruby 1.8.7 and 1.9.2.
- Create a topic branch
- Push to your branch
- Send a pull request