From cea0362753c3db3c0cf9c6aada21c8e88700c1f5 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 11 May 2022 15:51:51 -0400 Subject: [PATCH] Call `FlowExecutionListener.fireResumed` a bit later --- .../org/jenkinsci/plugins/workflow/job/WorkflowRun.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java index 44883c65..fbc57386 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java @@ -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); } } else { // Execution nulled due to a critical failure, explicitly mark completed completed = Boolean.TRUE;