Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Issues
  • #2050
Closed
Open
Issue created May 26, 2021 by Administrator@rootContributor

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

Arena Job screenshot showing logs having 2 Lorem Ipsum log lines

Bull version

3.22.6

Additional information

N/A

Assignee
Assign to
Time tracking