Skip to content
Permalink
Browse files

[JENKINS-22941] AsynchronousExecution.blocksRestart

Originally-Committed-As: 285b4501470f321086bcca4f98c871f2d5b6d418
  • Loading branch information
jglick committed Mar 24, 2015
1 parent 0e08f80 commit 40d1c43a2fbe7f76745ed53b6a73539c64d6cedd
Showing with 7 additions and 2 deletions.
  1. +7 −2 job/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
@@ -78,7 +78,7 @@
import jenkins.model.Jenkins;
import jenkins.model.lazy.BuildReference;
import jenkins.model.lazy.LazyBuildMixIn;
import jenkins.model.queue.Executable2;
import jenkins.model.queue.AsynchronousExecution;
import jenkins.util.Timer;
import org.jenkinsci.plugins.workflow.actions.LogAction;
import org.jenkinsci.plugins.workflow.flow.FlowDefinition;
@@ -96,7 +96,7 @@

@SuppressWarnings("SynchronizeOnNonFinalField")
@edu.umd.cs.findbugs.annotations.SuppressWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER") // completed is an unusual usage
public final class WorkflowRun extends Run<WorkflowJob,WorkflowRun> implements Executable2, LazyBuildMixIn.LazyLoadingRun<WorkflowJob,WorkflowRun> {
public final class WorkflowRun extends Run<WorkflowJob,WorkflowRun> implements Queue.Executable, LazyBuildMixIn.LazyLoadingRun<WorkflowJob,WorkflowRun> {

private static final Logger LOGGER = Logger.getLogger(WorkflowRun.class.getName());

@@ -212,6 +212,11 @@ private AsynchronousExecution sleep() {
}
getExecutor().recordCauseOfInterruption(WorkflowRun.this, listener);
}
@Override public boolean blocksRestart() {
// TODO check whether the CPS VM thread is active
// (and make it stop scheduling things when Jenkins.isQuietingDown())
return false;
}
};
final AtomicReference<ScheduledFuture<?>> copyLogsTask = new AtomicReference<ScheduledFuture<?>>();
copyLogsTask.set(Timer.get().scheduleAtFixedRate(new Runnable() {

0 comments on commit 40d1c43

Please sign in to comment.
You can’t perform that action at this time.