subdigital / devteach2012-linky

Rails app that uses Delayed Job and Resque to demonstrate background jobs in Ruby apps. Presented at DevTeach 2012 in Vancouver, May 2012.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do it Later with Delayed Job & Resque

This is a sample Rails app that demonstrates how to do background processing for Rails apps.

  • Delayed Job is used to fetch link details for a submitted URL
  • Resque is used to fetch user avatars from Gravatar

Installation / Running the app

To run on your machine, you must have Redis installed. To install on a Mac with Homebrew:

brew install redis

Make sure you migrate the database:

rake db:migrate

Then run the workers (each in their own tab):

rake jobs:work
QUEUE=* rake resque:work

Then run the rails server in its own tab:

rails s

That's it! Play with the app at http://localhost:3000/links and http://localhost:3000/users

Enjoy :)

License

This code is released under the MIT License.

About

Rails app that uses Delayed Job and Resque to demonstrate background jobs in Ruby apps. Presented at DevTeach 2012 in Vancouver, May 2012.


Languages

Language:Ruby 95.0%Language:CoffeeScript 2.6%Language:JavaScript 2.4%