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
  • #608
Closed
Open
Issue created Jul 06, 2017 by Administrator@rootContributor

Event chaining no longer works

Created by: ferronrsmith

version : 3.0.0-rc4

taskQueue.on('ready', () => {
  // Queue ready for job
  // All Redis connections are done
  logger.trace('Task Queue is now ready');
}).on('error', (error) => {
  logger.error(error);
}).on('active', (job) => {
  logTask(job, 'Started');
}).on('stalled', (job) => {
  // Job that was considered stalled. Useful for debugging job workers that crash or pause the event loop.
  logger.trace('job stalled', job);
}).on('completed', (job) => {
  // Job completed with output result!
  logTask(job, 'Completed');
});

Errors

/bull-queue/worker.js:39
}).on('error', (job) => {
   ^

TypeError: taskQueue.on(...).on is not a function
    at Object.<anonymous> (/bull-queue/worker.js:39:4)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3
Assignee
Assign to
Time tracking