Queue.obliterate does not remove job logs
Created by: nicholaswmin
Description
I expect that Queue.obliterate
will remove everything about a job, including it's previous logs.
Instead, adding a job with the same data (i think) causes the logs to accumulate.
MCVE
Run the below example 3 times and look at the logs in Arena. It shows 3 log lines instead of 1.
I expected that since I run Queue.obliterate
at the start of every script, logs would start anew therefore
only 1 "Lorem Ipsum" log line would be shown.
const Queue = require('bull')
const testQueue = new Queue('test')
;(async () => {
testQueue.on('drained', () => {
console.log('Queue drained.')
})
await testQueue.obliterate({ force: true })
testQueue.process(job => {
return job.log('Lorem Ipsum Dolor Sit Amet')
})
testQueue.add({ id: 'foo' })
})()
Arena UI Logs
Bull version
3.22.6
Additional information
N/A