org.jenkinsci.plugins.durabletask.executors.ContinuableExecutable Java Examples

The following examples show how to use org.jenkinsci.plugins.durabletask.executors.ContinuableExecutable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DockerOnceRetentionStrategy.java    From yet-another-docker-plugin with MIT License 6 votes vote down vote up
protected void done(Executor executor) {
    final AbstractCloudComputer<?> c = (AbstractCloudComputer) executor.getOwner();
    Queue.Executable exec = executor.getCurrentExecutable();
    if (executor instanceof OneOffExecutor) {
        LOG.debug("Not terminating {} because {} was a flyweight task", c.getName(), exec);
        return;
    }

    if (exec instanceof ContinuableExecutable && ((ContinuableExecutable) exec).willContinue()) {
        LOG.debug("not terminating {} because {} says it will be continued", c.getName(), exec);
        return;
    }

    LOG.debug("terminating {} since {} seems to be finished", c.getName(), exec);
    done(c);
}
 
Example #2
Source File: DockerSwarmAgentRetentionStrategy.java    From docker-swarm-plugin with MIT License 5 votes vote down vote up
private void done(Executor executor) {
    final DockerSwarmComputer c = (DockerSwarmComputer) executor.getOwner();
    Queue.Executable exec = executor.getCurrentExecutable();
    if (exec instanceof ContinuableExecutable && ((ContinuableExecutable) exec).willContinue()) {
        LOGGER.log(Level.FINE, "not terminating {0} because {1} says it will be continued",
                new Object[] { c.getName(), exec });
        return;
    }
    LOGGER.log(Level.FINE, "terminating {0} since {1} seems to be finished", new Object[] { c.getName(), exec });
    done(c);
}
 
Example #3
Source File: DockerOnceRetentionStrategy.java    From docker-plugin with MIT License 5 votes vote down vote up
private void done(Executor executor) {
    final DockerComputer c = (DockerComputer) executor.getOwner();
    Queue.Executable exec = executor.getCurrentExecutable();
    if (exec instanceof ContinuableExecutable && ((ContinuableExecutable) exec).willContinue()) {
        LOGGER.log(Level.FINE, "not terminating {0} because {1} says it will be continued", new Object[]{c.getName(), exec});
        return;
    }
    LOGGER.log(Level.FINE, "terminating {0} since {1} seems to be finished", new Object[]{c.getName(), exec});
    done(c);
}