Workers cannot be unregistered upon cold shut down, since there is no hook for that, UNIX-wise. Therefore, worker keys in Redis won't be cleaned up.
This bug is even more annoying due to #48.
The most reliable approach to solving this problem is to put Redis timeouts on the worker keys.
+1 on timeouts. I was confused when I took a look at rqinfo after a few restarts and saw a couple of dozen workers hanging around where I expected only one to be active.
This also affects when running under supervisor, with a configuration like the following rq fails to restart without manually deleting some keys
command=rqworker -v --name=myrq
Fixed in 0.3.0.
@nvie since this is fixed in 0.3.0, this issue should probably be closed
I realize this issue is fixed currently, but what's the best way to clean up these leaked worker registrations?