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
  • !1363

add support for a staggered interval

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/ancms2600/features/staggered-interval-offset into develop Jun 25, 2019
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: ancms2600

it would be nice to introduce an initial stagger/offset, for the case where you have many jobs being enqueued at the same time with repeatable schedules, and perhaps they are all set to the same interval, but you want them evenly spread over that interval, so you could then specify a stagger: Math.random()*interval to act as a delay that will offset when jobs of similar intervals get started, so they don't all start at the same time every time.

see also: https://github.com/OptimalBits/bull/issues/883#issuecomment-505552546

my use case is, i have 50 jobs running on a one minute interval, and without this change, the consumer's CPU utilization spikes at the beginning of every minute, and is idle after that. not as efficient.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/ancms2600/features/staggered-interval-offset