Skip to content

How can I know that all the tasks in the queue have completed? #1459

Answered by johnnyleejy
natilusky asked this question in Q&A
Discussion options

You must be logged in to vote

You can check if the queue's completed job count === number of published messages

if ((await queue.getCompletedCount()) === publishedCount){ // do something }

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@natilusky
Comment options

@johnnyleejy
Comment options

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