views:

26

answers:

1

I'm using Rails with resque.

The "sleep time" is the seconds of a worker sleeping after it can't find any new tasks.

The worker is created by QUEUE=* rake environment resque:work, and the default value is 5s, I can't to change it to 2s.

I have searched for this problem for several hours, somebody can help me?

+1  A: 

The answer is in the INTERVAL environment variable.

INTERVAL=2 rake resque:work

Or whatever other parameters you'd like to tack on.

Alex