kares/jruby-rack-worker — pull request #9 by jonatin (2013-01-07 12:50:53+00:00)
Title: Infinite loop in Resque worker using new Resque versions

Changed `RESERVE_ARG` variable to `RESERVE_ACCEPTS_INTERVAL` to make the intent of the code clearer and moved the `sleep(interval)` to the branch which isn't handled by the `reserve(interval)` call.

Tested on Mac OS X with Trinidad 1.4.4, JRuby 1.7.2, JDK 1.7.0_u10 with the worker in VVERBOSE mode. The log shows the worker sleeping for the configured interval (10 seconds) and the CPU usage is normal.