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
  • #1904
Closed
Open
Issue created Nov 14, 2020 by Administrator@rootContributor

queue.add options gets overriden by defaultJobOptions

Created by: otaviosoares

I have a code like the following and I expected the options passed to queue.add to have priority over queue's defaultJobOptions. However, as for now, if you have an option on defaultJobOptions it will always override anything you have in your add call. This was very confusing and it took me some time to figure out why it wasn't working.

const queue = new Queue('test', {
  defaultJobOptions: {delay: 10000 } 
});
queue.add('job', {}, { delay: 1000 });
Assignee
Assign to
Time tracking