本文整理了Java中jenkins.model.Jenkins.isQuietingDown()
方法的一些代码示例,展示了Jenkins.isQuietingDown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jenkins.isQuietingDown()
方法的具体详情如下:
包路径:jenkins.model.Jenkins
类名称:Jenkins
方法名:isQuietingDown
[英]Returns true if Jenkins is quieting down.
No further jobs will be executed unless it can be finished while other current pending builds are still in progress.
[中]如果Jenkins正在安静下来,则返回true。
除非在其他当前挂起的生成仍在进行中时可以完成作业,否则不会执行其他作业。
代码示例来源:origin: jenkinsci/jenkins
@Override
public String getUrlName() {
return Jenkins.getInstance().isQuietingDown() ? "cancelQuietDown" : "quietDown";
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Checks whether a task should not be scheduled because {@link Jenkins#isQuietingDown()}.
* @param task some queue task
* @return true if {@link Jenkins#isQuietingDown()} unless this is a {@link NonBlockingTask}
* @since 1.598
*/
public static boolean isBlockedByShutdown(Task task) {
return Jenkins.getInstance().isQuietingDown() && !(task instanceof NonBlockingTask);
}
代码示例来源:origin: jenkinsci/jenkins
@Override
public String getDescription() {
return Jenkins.getInstance().isQuietingDown() ? "" : Messages.ShutdownLink_Description();
}
代码示例来源:origin: jenkinsci/jenkins
public String getDisplayName() {
return Jenkins.getInstance().isQuietingDown() ? Messages.ShutdownLink_DisplayName_cancel() : Messages.ShutdownLink_DisplayName_prepare();
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Checks whether a task should not be scheduled because {@link Jenkins#isQuietingDown()}.
* @param task some queue task
* @return true if {@link Jenkins#isQuietingDown()} unless this is a {@link NonBlockingTask}
* @since 1.598
*/
public static boolean isBlockedByShutdown(Task task) {
return Jenkins.getInstance().isQuietingDown() && !(task instanceof NonBlockingTask);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public String getUrlName() {
return Jenkins.getInstance().isQuietingDown() ? "cancelQuietDown" : "quietDown";
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public String getDescription() {
return Jenkins.getInstance().isQuietingDown() ? "" : Messages.ShutdownLink_Description();
}
代码示例来源:origin: jenkinsci/workflow-cps-plugin
@SuppressFBWarnings(value="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification="runner.submit() result")
public Void call() throws Exception {
Jenkins j = Jenkins.getInstanceOrNull();
if (paused.get() || j == null || (execution != null && j.isQuietingDown())) {
代码示例来源:origin: jenkinsci/docker-plugin
@Nonnull
@Override
public StrategyDecision apply(@Nonnull NodeProvisioner.StrategyState state) {
if (Jenkins.getInstance().isQuietingDown()) {
return CONSULT_REMAINING_STRATEGIES;
}
for (Cloud cloud : Jenkins.getInstance().clouds) {
if (cloud instanceof DockerCloud) {
final StrategyDecision decision = applyFoCloud(state, (DockerCloud) cloud);
if (decision == PROVISIONING_COMPLETED) return decision;
}
}
return CONSULT_REMAINING_STRATEGIES;
}
代码示例来源:origin: openstack-infra/gearman-plugin
} else if (jenkins.isQuietingDown()) {
busy = true;
} else {
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public String getDisplayName() {
return Jenkins.getInstance().isQuietingDown() ? Messages.ShutdownLink_DisplayName_cancel() : Messages.ShutdownLink_DisplayName_prepare();
}
代码示例来源:origin: jenkinsci/openstack-cloud-plugin
@Override
public Collection<NodeProvisioner.PlannedNode> provision(Label label, int excessWorkload) {
Queue<JCloudsSlaveTemplate> templateProvider = getAvailableTemplateProvider(label);
List<PlannedNode> plannedNodeList = new ArrayList<>();
while (excessWorkload > 0 && !Jenkins.getActiveInstance().isQuietingDown() && !Jenkins.getActiveInstance().isTerminating()) {
final JCloudsSlaveTemplate template = templateProvider.poll();
if (template == null) {
LOGGER.info("Instance cap exceeded on all available templates");
break;
}
LOGGER.fine("Provisioning slave for " + label + " from template " + template.name);
int numExecutors = template.getEffectiveSlaveOptions().getNumExecutors();
ProvisioningActivity.Id id = new ProvisioningActivity.Id(this.name, template.name);
Future<Node> task = Computer.threadPoolForRemoting.submit(new NodeCallable(this, template, id));
plannedNodeList.add(new TrackedPlannedNode(id, numExecutors, task));
excessWorkload -= numExecutors;
}
return plannedNodeList;
}
代码示例来源:origin: jenkinsci/mesos-plugin
while (excessWorkload > 0 && !getJenkins().isQuietingDown()) {
代码示例来源:origin: jenkinsci/jclouds-plugin
List<PlannedNode> plannedNodeList = new ArrayList<PlannedNode>();
while (excessWorkload > 0 && !Jenkins.getInstance().isQuietingDown() && !Jenkins.getInstance().isTerminating()) {
内容来源于网络,如有侵权,请联系作者删除!