Resque: COUNT= n not working for spawning multiple workers

Created on 22 Dec 2009  ·  3Comments  ·  Source: resque/resque

Hello all,
This is my first post to the abode of Git :).

I'm trying to use resque for backend job processing in my Rails app ( v 2.0.2). I've installed rescue from the git as Rails plugin. But even if I mention the count variable only one worker is spawned.

COUNT= x QUEUE=request_queue rake environment resque:work

This I'm verifying from the rescue-web interface.

Can somebody help me out on this?

Another query is how can I use god module that comes with Resque. There is not much information available on this.

Thanks all in advance
dg

Most helpful comment

You are using the wrong rake task to start multiple workers. Try "resque:workers" instead of "resque:work".

For god configuration, see http://github.com/defunkt/resque/tree/master/examples/god/. I had to tweak it a bit to work for me, and it still seems to have problems, but it's a decent starting point. Note, it won't actually stop the workers when you ask it to. You'll need to write a script for that or kill them manually (via kill -QUIT $PID).

All 3 comments

You are using the wrong rake task to start multiple workers. Try "resque:workers" instead of "resque:work".

For god configuration, see http://github.com/defunkt/resque/tree/master/examples/god/. I had to tweak it a bit to work for me, and it still seems to have problems, but it's a decent starting point. Note, it won't actually stop the workers when you ask it to. You'll need to write a script for that or kill them manually (via kill -QUIT $PID).

Thanks a lot for Nevans fro your help. Multiple workers creation is working.

  • Does every worker runs on a thread spawned by the Rails App(rescue plugin) or is it
    a separate process altogether?
  • According to the online documenation - With Resque's parent / child architecture you can tell the parent to forcefully kill the child then immediately start processing more jobs.
    Is the Rails App process here being mentioned as the parent and the workers as the child or is it that I am missing a point here?
  • Is there some form of architecture or design document available on Resque?

cheers
dg

If you are using linux, the following command should make things more clear to you:

ps -ef f | grep [r]esque
Was this page helpful?
0 / 5 - 0 ratings