0
Resque
Asynchronous
 Processing
Two popular options


• DelayedJob
• Resque
DelayedJob

• http://github.com/tobi/delayed_job
• ActiveRecord based
•   BatchImporter.new(Shop.find(1)).send_later
    (...
Resque

• http://github.com/defunkt/resque
• Redis based
• Battle tested at GitHub
Usage
class Converter
  @queue = :conversion

 def self.perform(id)
  ...
 end
end

Resque.enqueue(Converter, 123)
Invoking

QUEUE=:conversion rake environment resque:work
Sample App


• http://github.com/joerichsen/resque_demo
Misc

• MySQL has gone away - http://axonflux.com/resque-to-the-rescue-but-a-gotcha-dont-forget




• Deployment and Capist...
Mailers specifically


• http://github.com/zapnap/resque_mailer
• http://github.com/andersondias/
  delayed_job_mailer
Upcoming SlideShare
Loading in...5
×

Resque

1,217

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,217
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Resque"

  1. 1. Resque
  2. 2. Asynchronous Processing
  3. 3. Two popular options • DelayedJob • Resque
  4. 4. DelayedJob • http://github.com/tobi/delayed_job • ActiveRecord based • BatchImporter.new(Shop.find(1)).send_later (:import_massive_csv, massive_csv)
  5. 5. Resque • http://github.com/defunkt/resque • Redis based • Battle tested at GitHub
  6. 6. Usage class Converter @queue = :conversion def self.perform(id) ... end end Resque.enqueue(Converter, 123)
  7. 7. Invoking QUEUE=:conversion rake environment resque:work
  8. 8. Sample App • http://github.com/joerichsen/resque_demo
  9. 9. Misc • MySQL has gone away - http://axonflux.com/resque-to-the-rescue-but-a-gotcha-dont-forget • Deployment and Capistrano • Priorities • Namespaces
  10. 10. Mailers specifically • http://github.com/zapnap/resque_mailer • http://github.com/andersondias/ delayed_job_mailer
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×