Skip to content

Make nightly job kick of child jobs and wait until all are finished before completing #1966

Answered by roggervalf
sbruinsje asked this question in Q&A
Discussion options

You must be logged in to vote

hi @sbruinsje, sorry for the delay. job.moveToWaitingChildren() method moves the job to waiting children only if there are no pending children, this is why this method returns a boolean, to know if we moved the parent job to waiting-children state. When it returns true, we must throw WaitingChildrenError to prevent calling moveToFinished script and get missing lock error as we already moved the job to another state (waiting-children) and we delete the lock, this is happening in this way because we only keep the lock when job is in active state. Having this in place, when moving the parent to waiting children, workers are not blocked and they can pick other jobs to be processed. As soon as…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@sbruinsje
Comment options

@roggervalf
Comment options

Answer selected by sbruinsje
Comment options

You must be logged in to vote
2 replies
@sbruinsje
Comment options

@theDanielJLewis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants