I have the following problem: I have several workers that fetch jobs from the database and process them. There are always new jobs coming in, so I cannot pause the queue, because there will always be new jobs and the pause promise will not resolve. I want to shut down the worker gracefully. Is there a way to do this?
I have the following problem: I have several workers that fetch jobs from the database and process them. There are always new jobs coming in, so I cannot pause the queue, because there will always be new jobs and the pause promise will not resolve. I want to shut down the worker gracefully. Is there a way to do this?