You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just curious if this is the most efficient way to clear an entire single queue of all jobs regardless of state.
It doesn't seem like .empty() or removeJobs('*') gets all jobs through my testing, but when using both it seems to consistently clear a queue. Is there a better, more sure-fire way to doing this?
Note, looping over each state and calling clean(0, state) didn't seem to clear all jobs either.
Minimal, Working Test code to reproduce the issue.
// No need to `.then()` an `await`
// await queue.pause(true).then(async () => {
// await queue.empty()
// await queue.removeJobs('*')
// await queue.resume(true)
// })
await userQueue.pause(true)
await userQueue.empty()
await userQueue.removeJobs('*')
return await userQueue.resume(true)
Bull version
v3.16.0
Additional information
None
The text was updated successfully, but these errors were encountered:
Description
Just curious if this is the most efficient way to clear an entire single queue of all jobs regardless of state.
It doesn't seem like
.empty()
orremoveJobs('*')
gets all jobs through my testing, but when using both it seems to consistently clear a queue. Is there a better, more sure-fire way to doing this?Note, looping over each state and calling
clean(0, state)
didn't seem to clear all jobs either.Minimal, Working Test code to reproduce the issue.
Bull version
v3.16.0
Additional information
None
The text was updated successfully, but these errors were encountered: