Glenn Gillen
2008-May-21 10:59 UTC
[Backgroundrb-devel] Queuing in backgroundrb, is it possible?
Hey all, I''ve been playing with backgroundrb for a while but I''ve never had to worry about this particular scenario. We have a process that can take a while (<30secs) to return results so it needs to be moved off of the standard rails stack and into backgroundrb land (easy, and essentially done). However, we can''t tolerate the possibility that any more than 5 concurrent requests are sent to this service, is there a way to have backgroundrb throttle concurrency and queue and back up any further jobs until a slot is available? Thanks, -- Glenn
hemant
2008-May-21 11:13 UTC
[Backgroundrb-devel] Queuing in backgroundrb, is it possible?
On Wed, May 21, 2008 at 4:29 PM, Glenn Gillen <glenn.gillen at gmail.com> wrote:> Hey all, > > I''ve been playing with backgroundrb for a while but I''ve never had to > worry about this particular scenario. > > We have a process that can take a while (<30secs) to return results so > it needs to be moved off of the standard rails stack and into > backgroundrb land (easy, and essentially done). However, we can''t > tolerate the possibility that any more than 5 concurrent requests are > sent to this service, is there a way to have backgroundrb throttle > concurrency and queue and back up any further jobs until a slot is > available? >If you are using inbuilt thread pool, you can pretty much easily do that. To avoid ''throttling'' you can reduce thread_pool size.