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

Make sure that we are removing job from waiting list when moving to finished

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed rysi3k requested to merge github/fork/rysi3k/fix/removing_from_waiting_when_calling_moveToFailed into develop Jan 14, 2022
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

Hi I had some specific case and found resolution so created a PR. My case:

  1. No available processors
  2. New job is added to queue
  3. My JS code is starting timer - max time to respond to client (some checks + addjob + processjob + parse result + sending response)
  4. When my timer is fired, but no workers available I need to make sure that this job will be not started (it makes no sense to start job when new processor will be available because client already got error response) So I call:
  • job.discard()
  • job.moveToFailed(error)

Without my change, job is added to failed list but is still hanging in wait list.

Have a nice day :)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/rysi3k/fix/removing_from_waiting_when_calling_moveToFailed