Open r1b opened 9 years ago
I haven't run into this problem, and I am doing graceful restarts in production. In addition to setting that expiration, it also sets the "death" key in the hash, and this condition will allow the new scheduler to start up when that "death" key is present:
https://github.com/ui/rq-scheduler/blob/46b29da/rq_scheduler/scheduler.py#L32-L34
I'm not sure what the purpose is of keeping it around for 60 seconds, but it doesn't seem to cause a problem.
In register_death, the scheduler key is set to expire in 60s:
In a production application where the scheduler must gracefully handle restarts, this becomes problematic. No new scheduler can start until 60 seconds has passed. It would be nice to be able to adjust this parameter to allow for faster restart.