daniel
daniel

Reputation: 41

Implement queue rails 3

That's my issue.

I'm implementing a system where a video has to wait his own turn to access to such resource and being processed. So i need to implement a queue that receives a signal when the resource is free so that the rest of requests could be satisfied. It is supposed that not more of 10/20 requests would be in queue. The resource use depends on the length of the video.

I read something about resque ad delay_job. What do you thing is better for my needs?

Thanks in advance.

Upvotes: 1

Views: 303

Answers (2)

Shamith c
Shamith c

Reputation: 3739

Both DJ and Resque are gems to help the background jobs. Main dereference is DJ stores jobs in DB but Resque in Redis.

I supports Resque , because

 1. A Ruby library for creating, querying, and processing jobs 

 2. A Rake task for starting a worker which processes jobs

 3. A Sinatra app for monitoring queues, jobs, and workers.

Simple to integrate with Rails application.

Upvotes: 1

Tigraine
Tigraine

Reputation: 23648

If you need something simple that only runs on one machine I would suggest you use delayed_job. I've had much success with using it to transcode videos on the server and setup and administration is pretty trivial.

See the documentation on delayed_job for instructions on how to set it up.

Upvotes: 0

Related Questions