What is the correct order to close the queue and workers? #2622
Replies: 3 comments 1 reply
-
Which specific keys are you finding in the Redis that belongs to a queue after calling Obliterate? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply. After trying to delete or obliterate it, I typically find a hash named ‘meta’ and a key with the queue name containing ‘meta, events, and id’. We are trying to delete the queue from the app that created the queue. In the app that contains the workers consuming queues we just provide the work the queue name and assume it will stop once the queue is deleted. Our theory is that the worker keeps the queue alive and that's why we have these remains and connections refuse to close. |
Beta Was this translation helpful? Give feedback.
-
What I have found is that you must do the following:
If you only obliterate the queue, then the connections remain open. If you only close the connections, then the queue has remains. However, this combination appears to work when wrapped in a |
Beta Was this translation helpful? Give feedback.
-
Hi All, We create a BullMQ Queue in one app. Another app polls Redis for new queues and then spawns a BullMQ worker to manage each queue. The first app closes the queue when done (I've tried deleting, obliterating, etc. - everything in the docs). However, something continuously regenerates the Queue in Redis and keeps the connections alive. I suspect the BullMQ workers are not automatically closed when the queue is destroyed. What is the correct method or sequence of events to tear down the Queue and Workers so all of the connections close and there are no remains in the database? Which end of the queue is in charge of tearing things down?
Beta Was this translation helpful? Give feedback.
All reactions