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
  • #2030
Closed
Open
Issue created Apr 28, 2021 by yairk@yairk

Removing repeatable jobs by data passed in queue.add

If I understand correctly, repeatable jobs are created via queue.add() by passing the repeat option as described e.g. here.

When calling getRepeatableJobs, however, all of the data that was passed to queue.add() is not returned. Instead, I only get the key, name, id, etc.

In my use case, I am creating a repeatable job while passing a type field in the job's data. If I then want to cancel all of the repeatable jobs of that type, how would I go about doing that? The only way I could so far come up with is to get all of the delayed jobs, filter the ones with the right type, and then retrieve all the repeatable jobs and "somehow" correlate their keys/ids with the delayed jobs.

Is there a better way to achieve this? If not, what's the safest way to correlate a delayed job with its repeatable job?

Bull version

1.14.8

Assignee
Assign to
Time tracking