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
  • Merge requests
  • !852

Added repeatable limit feature

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/alexkh13/repeat_limit into master Feb 04, 2018
  • Overview 3
  • Commits 3
  • Pipelines 0
  • Changes 4

Created by: alexkh13

The problem: When dealing with clustered processors, it is hard to achieve an easy implementation to limit the number of times a repeatable job should run without diving into Bull's nextRepeatableJob method.

The solution: An extended attribute on the RepeatOpts interface to indicate how many times the job should run at max. It will increment a counter on the RepeatOpts itself ("count") to help keep track of what is the limit and how many jobs were already initiated.

I've added a test case and updated the Queue.add method documentation accordingly.

Works like a charm on my clustered app :)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/alexkh13/repeat_limit