Your SlideShare is downloading. ×
0
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Introduction To Delayed Job
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction To Delayed Job

5,197

Published on

An introduction to the delayed_job gem.

An introduction to the delayed_job gem.

Published in: Technology, Business
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,197
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
15
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. "Maybe we should have a talk on delayed_job" @subelsky
  • 2. An Introduction to delayed_job @bmoreonrails 2009-11-10
  • 3. I’m @jonathanjulian
  • 4. Why do we need background processing?
  • 5. User Experience
  • 6. Sending an email
  • 7. Resizing an image
  • 8. Updating a web service
  • 9. Geocoding
  • 10. Batch import
  • 11. Delayed::Job “Extracted from Shopify” database-persisted queue 0..n runners
  • 12. tobi/delayed_job
  • 13. collectiveidea/delayed_job
  • 14. Setup
  • 15. gem
  • 16. The Queue
  • 17. One db migration
  • 18. Let’s delay something
  • 19. Notifier.deliver_activation_instructions(self)
  • 20. Notifier.send_later(:deliver_activation_instructions, self)
  • 21. Easy!
  • 22. class Notifier def deliver_activation_instructions(user) # ... end handle_asynchronously :deliver_activation_instructions end
  • 23. Custom jobs
  • 24. class LongRunningJob < Struct.new(:id) def perform # do some crazy long calculations end end Delayed::Job.enqueue LongRunningJob.new(42)
  • 25. Who runs the jobs?
  • 26. Workers
  • 27. rake jobs:work # Start a delayed_job worker.
  • 28. script/delayed_job start * collectiveidea/delayed_job only
  • 29. Production Deployment
  • 30. # play nice with Passenger require 'delayed/recipes' after "deploy:update_code", "delayed_job:stop" after "deploy:restart", "delayed_job:start"
  • 31. http://railstips.org/ 2008/11/19/delayed- gratification-with-rails
  • 32. "I highly recommend DelayedJob to anyone whose site is not 50% background work." @defunkt
  • 33. @jonathanjulian http://jonathanjulian.com/
  • 34. Photo Attributions • http://www.flickr.com/photos/aloshbennett/540105576/ • http://www.flickr.com/photos/gyrus/132436475/ • http://www.flickr.com/photos/gavatron/866650954/

×