ui/rq-scheduler — pull request #62 by SirScott (2014-11-03 18:20:45+00:00)
Title: rqscheduler can constantly attempt to register itself.

Allow rqscheduler to keep attempting to register itself periodically.

My use case is that I have N identical hosts all running rqworker and rqscheduler processes under the watchful eye of supervisor. As supevisord doesn't support an 'unlimited' value for the 'startretries' program configuration option, eventually the rqscheduler process will be moved into supervisor's failed state. Thus, if the host that was successfully running rqscheduler goes down, none of the other existing hosts can automatically take its place.

Similarly, when performing rolling updates, the new hosts come online and try to launch rqscheduler. This fails because an old host is already executing it. If the rollout is slow, it's possible that the new hosts will again have put rqscheduler into a failed state before the old host is rolled out. This will result in a new deployment where rqscheduler is not running.

This patch will allow rqscheduler itself to keep retrying its registration process. Backwards compatability is preserved by aborting by default.