Closed TomKaltz closed 8 years ago
Why not have a table that holds queue names and metadata for that queue such as paused state. That way all workers can listen to changefeed of the paused property of the pertaining queue row?
I've spent a few hours on this today, and it works perfectly. Published in v0.3.0. The final approach I took was to used a fixed document id in the database and just update it with global status. This causes the change feed to update the worker Queue objects.
Just call Queue.pause(true)
for a global pause. Without the true
it is a local pause only.
I'll update the docs when I can.
Thanks again.
@TomKaltz. Yes, I tried to come up with a idea for global pause a couple of months ago. Only recently I thought of a pub/sub method I could use to give global pause.
I'll think on it more.