Skip to content

Commit

Permalink
[JENKINS-22941] AsynchronousExecution.blocksRestart
Browse files Browse the repository at this point in the history
Originally-Committed-As: 285b4501470f321086bcca4f98c871f2d5b6d418
  • Loading branch information
jglick committed Mar 24, 2015
1 parent 0e08f80 commit 40d1c43
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -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;
Expand All @@ -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());

Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 40d1c43

Please sign in to comment.