Skip to content

Commit

Permalink
Merge pull request jenkinsci#256 from jglick/ParallelResumer-ready
Browse files Browse the repository at this point in the history
`FlowExecutionList.ParallelResumer` should wait until Jenkins startup is complete
  • Loading branch information
jglick authored Oct 17, 2022
2 parents 4596ea5 + 597ffe7 commit 8005c68
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,15 @@ private static final class ParallelResumer {
}

synchronized void run() {
if (Jenkins.get().isTerminating()) {
LOGGER.fine("Skipping step resumption during shutdown");
return;
}
if (Jenkins.get().getInitLevel() != InitMilestone.COMPLETED || Jenkins.get().isQuietingDown()) {
LOGGER.fine("Waiting to resume step until Jenkins completes startup and is not in quiet mode");
Timer.get().schedule(this::run, 100, TimeUnit.MILLISECONDS);
return;
}
LOGGER.fine(() -> "Checking status with nodes=" + nodes + " enclosing=" + enclosing + " processing=" + processing);
if (nodes.isEmpty()) {
if (processing.isEmpty()) {
Expand Down

0 comments on commit 8005c68

Please sign in to comment.