public CauseOfBlockage canTake(Node node, Queue.BuildableItem item) { // Ask the AvailabilityMonitor for this node if it's okay to // run this build. ExecutorWorkerThread workerThread = null; synchronized(gewtHandles) { Computer computer = node.toComputer(); for (ExecutorWorkerThread t : gewtHandles) { if (t.getComputer() == computer) { workerThread = t; break; } } } if (workerThread != null) { if (workerThread.getAvailability().canTake(item)) { return null; } else { return new CauseOfBlockage.BecauseNodeIsBusy(node); } } return null; }
@Override public CauseOfBlockage canTake(Queue.BuildableItem item) { // hack for some core issue if (item.task instanceof Queue.FlyweightTask) { return new FlyweightCauseOfBlockage(); } return super.canTake(item); }
@Override public CauseOfBlockage canTake(Queue.BuildableItem item) { if (item.task instanceof DeployNowTask) { return null; } return CauseOfBlockage.fromMessage(Messages._DeployNowSlave_OnlyAcceptsDeployNowTasks()); }
public CauseOfBlockage getCauseOfBlockage() { if (System.currentTimeMillis() > nextCheckForNode) { nextCheckForNode = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(60); Computer.threadPoolForRemoting.submit(new Runnable() { public void run() { DeployNowSlave.ensurePresent(); } }); } return null; }
@Override public CauseOfBlockage canTake(Task task) { initPython(); if (pexec.isImplemented(2)) { return (CauseOfBlockage) pexec.execPython("can_take", task); } else { return super.canTake(task); } }
@Override public CauseOfBlockage canTake(BuildableItem item) { initPython(); if (pexec.isImplemented(3)) { return (CauseOfBlockage) pexec.execPython("can_take", item); } else { return super.canTake(item); } }
@Override public CauseOfBlockage canTake(Task task) { initPython(); if (pexec.isImplemented(7)) { return (CauseOfBlockage) pexec.execPython("can_take", task); } else { return super.canTake(task); } }
@Override public CauseOfBlockage canTake(Queue.BuildableItem item) { initPython(); if (pexec.isImplemented(8)) { return (CauseOfBlockage) pexec.execPython("can_take", item); } else { return super.canTake(item); } }
@Override public CauseOfBlockage canTake(Node node, Queue.BuildableItem item) { // update only when gearman-plugin is enabled if (!GearmanPluginConfig.get().enablePlugin()) { return null; } return GearmanProxy.getInstance().canTake(node, item); }
@Deprecated public String getWhyBlocked() { CauseOfBlockage causeOfBlockage = getCauseOfBlockage(); return causeOfBlockage == null ? null : causeOfBlockage.getShortDescription(); }
public CauseOfBlockage superCanTake(Task task) { return super.canTake(task); }
public CauseOfBlockage superCanTake(BuildableItem item) { return super.canTake(item); }
public CauseOfBlockage superCanTake(Queue.BuildableItem item) { return super.canTake(item); }