play/type blog

We are creating Germany's juiciest event platform, boomloop.com. Because we love the Internet more than our own mothers. See for yourself. check out boomloop.com


If you want to send mail asynchronously in your rails app, but don’t want to bother with using a queue server like Starling, then have a go at this…

First, run this:

./script/plugin install git://github.com/purzelrakete/workling.git
./script/plugin install git://github.com/langalex/workling_mailer.git
./script/plugin install git://github.com/matthewrudy/rudeq.git
rake queue:setup
rake db:migrate

now add this to your environment:

Workling::Clients::MemcacheQueueClient.memcache_client_class = RudeQ::Client
Workling::Remote.dispatcher = Workling::Remote::Runners::ClientRunner.new

Finally, add this into the body of your mailer classes:

include AsynchMail

now start the workling client:

./script/workling_client start

done!