wallace/resque-lonely_job — pull request #9 by lwoodson (2014-08-08 02:22:20+00:00)
Title: Sleep for 1 second before requeuing to give CPU's a rest

Without this, when a worker requeues a job, it immediately starts
looking for another job without pause. It typically finds the
just requeued job and pops it off to create a loop that pegs a
CPU core until it can actually run the job and finish.

This fixes the issue by:

* Introducing a @requeue_interval variable in jobs that can be
used to control how long a worker will sleep before requeuing
a job.
* Providing a default of 1 second to ensure a worker process
won't hog a server's core.

This is a fix for issue 8:

https://github.com/wallace/resque-lonely_job/issues/8