Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call FlowExecutionListener.fireResumed a bit later #260

Merged
merged 3 commits into from
Jun 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -565,11 +565,11 @@ private String key() {
}

if (Boolean.FALSE.equals(completed)) {
// we've been restarted while we were running. let's get the execution going again.
FlowExecutionListener.fireResumed(fetchedExecution);

getListener().getLogger().println("Resuming build at " + new Date() + " after Jenkins restart");
Timer.get().submit(() -> Queue.getInstance().schedule(new AfterRestartTask(WorkflowRun.this), 0)); // JENKINS-31614

// we've been restarted while we were running. let's get the execution going again.
FlowExecutionListener.fireResumed(fetchedExecution);
Comment on lines +570 to +572
Copy link
Member

@dwnusbaum dwnusbaum May 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just so that the message gets printed first, or is it important for the AfterRestartTask to be in the queue before we start resuming the steps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly just to print the message first.

}
} else { // Execution nulled due to a critical failure, explicitly mark completed
completed = Boolean.TRUE;
Expand Down