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

fix(queue): fix calculation for next repeat job

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/andrewburgess/master into master Jun 05, 2017
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: andrewburgess

Fix delay calculation. Previously, it would not work if queue.add was called multiple times, since the delay would always be the interval length instead of the amount of time from now to the next call.

Add isRepeat flag to change which iteration is calculated. Only calculate based on queue millis when we repeat to get the next job, otherwise use the current time so the immediate next interval is used.

Not sure if the isRepeat flag is the best way to handle this, but I think there needs to be a differentiation between calling queue.add and adding the next repetition of the job.

Addresses #558 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/andrewburgess/master