Replies: 1 comment 2 replies
-
The reason that it is important to close a worker when shutting down a service is that it may be processing jobs and by gracefully closing it reduces the chance of having jobs that stall. This is not a problem for the Queue instance, however, it should always be a good practice to close all your connections and Queues are connected to Redis so I would also close them. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm building a huge application with a lot of workers and queues and I want to correctly handle node signals.
Currently I have the following:
Where the
closeWorkers()
function is the following and follows the docs:Now, should I also call the
close()
method on the queue instance? If yes, I should call it after the workers, right?And what is the best approach to handle this when the redis instance is down? I mean when the
retryStategy()
still fails.Beta Was this translation helpful? Give feedback.
All reactions