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
  • #367
Closed
Open
Issue created Nov 07, 2016 by Administrator@rootContributor

Failed Attempt event

Created by: cpitt

While I find Bull to be a great improvement over Kue, one thing that I find myself missing from Kue is the differentiation of failed and failed attempt events. Currently my workaround is:

myQueue
  .on('failed',
    (queueJob, error) => {
      const {attempts, attemptsMade} = queueJob;
      if (attempts === attemptsMade) {
        doSomethingForFailure();
      } else {
        doSomethingElseForAttempt();
      }
    }

I realize that having different events for failed and failed attempt would be a breaking change and would need to wait until the next minor or even major release, but in the mean time it might be worth documenting the above work around (or another if there is a better way of achieving this) for others coming from Kue who might require this functionality.

I'd be more than happy to create a PRs if this request seems reasonable and inline with your project.

Assignee
Assign to
Time tracking