Rails 4 Queues

  • Caike
  • 3293 views
Hall-pass

Oops, a subscription is required to view this video. You can enroll now to watch, or try out all that Code School has to offer with a free two-day Hall Pass.

Comments

Zachary Abresch said

That's sweet. I didn't even know Rails 4 had a queue capability.

Digidentity said

Has anyone tried to backport this new interface to Rails 3? So we can use the new interface in Rails 3 apps already and worry less about rails upgrades of our code later?

(I tried Googling for it, but queue is such a generic term that I got too big a variety of search results)

Faculty

Code School Support said

Yes, Theo. Rails 4 can handle multiple queues, like so:

Rails.queue[:payment_queue] = PaymentQueue.new Rails.queue[:email_queue] = EmailQueue.new

Theo Mills said

Can Rails 4 handle multiple queues?

zlippr said

this is great !!!

Shay Dadosh said

Bravo! Very interesting stuff. Thanks :)

Faculty

Carlos Souza said

Thanks, guys! Just added the link to the app to the Resources sections ;)

Asher Cohen said

I think the source code is missing from the resources

Jeff Powell said

Interesting look at the new quing capabilities in Rails 4. Thanks for putting this together.

About

Rails 4 introduces a common Queue interface, which aims to provide a standard API for working with background jobs.

Rails 3.x offers different solutions for this, but each one exposes their own custom interface. In this screencast, we will take a look at the reasoning behind Rails 4 Queues and the current state for the API.

Subscribe