@Override protected void printWaitingMessage(TaskListener listener) { Queue.Item item = Queue.getInstance().getItem(itemID); String message = Messages.ExecutorPickle_waiting_to_resume(task.getFullDisplayName()); if (item == null) { // ??? listener.getLogger().println(message); return; } CauseOfBlockage causeOfBlockage = item.getCauseOfBlockage(); if (causeOfBlockage != null) { listener.getLogger().print(message + ": "); causeOfBlockage.print(listener); // note that in case of Messages.Queue_Unknown for WaitingItem this is not very helpful } else { listener.getLogger().println(message); } } @Override public boolean cancel(boolean mayInterruptIfRunning) {
if(why != null && !why.equals(whyInQueue) && System.currentTimeMillis()-startTime>5000) { CauseOfBlockage cause = qi.getCauseOfBlockage(); if (cause != null) { listener.getLogger().print("Configuration " + ModelHyperlinkNote.encodeTo(c)+" is still in the queue: ");
LOGGER.log(Level.INFO, "All {0} started", startedCount); assertThat(notStartedIndex, not(is(-1))); assertThat(q[notStartedIndex].getCauseOfBlockage(), notNullValue()); break;
LOGGER.log(Level.INFO, "All {0} for tranch 1 started", startedCount); assertThat(notStartedIndex, not(is(-1))); assertThat(q[notStartedIndex].getCauseOfBlockage(), notNullValue()); break;
@Issue("JENKINS-50561") @Test public void rateLimitBuilds() throws Exception { WorkflowRun b = expect("rateLimitBuilds") .go(); WorkflowJob p = b.getParent(); RateLimitBranchProperty.JobPropertyImpl prop = p.getProperty(RateLimitBranchProperty.JobPropertyImpl.class); assertNotNull(prop); assertEquals(1, prop.getCount()); assertEquals("day", prop.getDurationName()); assertFalse(prop.isUserBoost()); QueueTaskFuture<WorkflowRun> inQueue = p.scheduleBuild2(0); while (!Queue.getInstance().contains(p)) { Thread.yield(); } Queue.getInstance().maintain(); Queue.Item queued = Queue.getInstance().getItem(p); assertThat(queued.isBlocked(), is(true)); assertThat(queued.getCauseOfBlockage().getShortDescription().toLowerCase(), containsString("throttle")); inQueue.cancel(true); }
/** * Gets a human-readable status message describing why it's in the queue. */ @Exported public final String getWhy() { CauseOfBlockage cob = getCauseOfBlockage(); return cob!=null ? cob.getShortDescription() : null; }
/** * Gets a human-readable status message describing why it's in the queue. */ @Exported public final String getWhy() { CauseOfBlockage cob = getCauseOfBlockage(); return cob!=null ? cob.getShortDescription() : null; }
/** * Gets a human-readable status message describing why it's in the * queue. */ @Exported public final String getWhy() { CauseOfBlockage cob = getCauseOfBlockage(); return cob != null ? cob.getShortDescription() : null; }
/** * Gets a human-readable status message describing why it's in the queue. */ @Exported public final String getWhy() { CauseOfBlockage cob = getCauseOfBlockage(); return cob!=null ? cob.getShortDescription() : null; }
@Override public String toString() { Queue.Item item = Queue.getInstance().getItem(itemID); if (item != null) { return "Trying to schedule " + task.getFullDisplayName() + "; blockage: " + item.getCauseOfBlockage(); } else { return "Trying to locate queue item #" + itemID; } } };
/** * Gets a human-readable status message describing why it's in the queue. */ @Exported public final String getWhy() { CauseOfBlockage cob = getCauseOfBlockage(); return cob!=null ? cob.getShortDescription() : null; }
/** * Gets a human-readable status message describing why it's in the queue. */ @Exported public final String getWhy() { CauseOfBlockage cob = getCauseOfBlockage(); return cob!=null ? cob.getShortDescription() : null; }