Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue.obliterate does not remove job logs #2050

Closed
nicholaswmin opened this issue May 26, 2021 · 2 comments
Closed

Queue.obliterate does not remove job logs #2050

nicholaswmin opened this issue May 26, 2021 · 2 comments
Labels

Comments

@nicholaswmin
Copy link

nicholaswmin commented May 26, 2021

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

Arena Job screenshot showing logs having 2 Lorem Ipsum log lines

Bull version

3.22.6

Additional information

N/A

@manast manast closed this as completed in 6ccf2b9 May 31, 2021
github-actions bot pushed a commit that referenced this issue May 31, 2021
## [3.22.7](v3.22.6...v3.22.7) (2021-05-31)

### Bug Fixes

* **obliterate:** remove job logs fixes [#2050](#2050) ([6ccf2b9](6ccf2b9))
@manast
Copy link
Member

manast commented May 31, 2021

🎉 This issue has been resolved in version 3.22.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nicholaswmin
Copy link
Author

Amazing, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants