rq / rq-scheduler

A lightweight library that adds job scheduling capabilities to RQ (Redis Queue)
MIT License
1.44k stars 230 forks source link

birth / death #227

Open marcinn opened 4 years ago

marcinn commented 4 years ago

Hi.

My 4 servers are running scheduler, but 5th started crashing with "There's already an active RQ scheduler" message. But there is no active RQ scheduler on this particular machine. There is active scheduler on other machine.

I've inspected the code and I do not understand what for are registering birhts and deaths. There is lock already implemented. The scheduler_key is shared between all instances. There is no real difference between "local" and "remote" instances.

I think that briths and deaths can be removed. Any thoughts?

Edit: sometimes rqscheduler runs on two or more machines, sometimes just one can work at once. This is bad, because there is no redundancy (failover)

oxalorg commented 4 years ago

@marcinn I think this should be fixed on master as #212 was merged recently.

marcinn commented 4 years ago

Thanks! I'll try if I had some time.