Skip to content

How to wait for a queue to be idle for a serverless functions? #3072

Answered by roggervalf
knthmn asked this question in Q&A
Discussion options

You must be logged in to vote

Now I see what you meant. Yes, when closing, workers won't pick new jobs. We have this event https://api.docs.bullmq.io/interfaces/v5.WorkerListener.html#drained, but take in count that any job apart of waiting ones are not considered by this event.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@knthmn
Comment options

@roggervalf
Comment options

Answer selected by knthmn
@manast
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants