When forcing an exit (ctrl+c) or when the app exits automatically it currently does this naively and doesn't wait for things to finish before closing everything down (aside from a fixed delay). This causes remnants to remain in the system, such as not probably clearing up and removing the Redis queues. I believe this is because the workers are being shut down before the onComplete handlers are picked up to clean Redis.
It would be good if the queue workers were allowed to shut down gracefully before exiting, or at least give them a chance to and then enforce an exit if they don't do so within some time period.
A lot of improvements have recently landed around handling how the jobs exit. I'm going to close this and we can open issues for any specific problems.
When forcing an exit (ctrl+c) or when the app exits automatically it currently does this naively and doesn't wait for things to finish before closing everything down (aside from a fixed delay). This causes remnants to remain in the system, such as not probably clearing up and removing the Redis queues. I believe this is because the workers are being shut down before the
onComplete
handlers are picked up to clean Redis.It would be good if the queue workers were allowed to shut down gracefully before exiting, or at least give them a chance to and then enforce an exit if they don't do so within some time period.