I have a use case in which I will stop saving jobs of a specific type after a certain point in the application lifecycle; also, this point is not predictable. At this point, I'd like to release the resources consumed by this Worker instance. I checked the source code, and it seems that there's a Worker.prototype.shutdown, which is invoked on all Worker instances inside the Queue singleton when Queue.prototype.shutdown is called.
From what I could understand, it seems to be safe to call Worker.prototype.shutdown on my own, do you guys confirm my understanding? Also, in case of a positive answer, wouldn't it be useful for other users as well, to function document this function in the README.md?
I have a use case in which I will stop saving jobs of a specific type after a certain point in the application lifecycle; also, this point is not predictable. At this point, I'd like to release the resources consumed by this Worker instance. I checked the source code, and it seems that there's a
Worker.prototype.shutdown,
which is invoked on all Worker instances inside the Queue singleton whenQueue.prototype.shutdown
is called.From what I could understand, it seems to be safe to call
Worker.prototype.shutdown
on my own, do you guys confirm my understanding? Also, in case of a positive answer, wouldn't it be useful for other users as well, to function document this function in the README.md?