private void finish2() { for (RuntimeException e1 : owner.getTerminatedBy()) { LOGGER.log(Level.FINE, String.format("%s termination trace", getName()), e1); } owner.removeExecutor(this); if (this instanceof OneOffExecutor) { owner.remove((OneOffExecutor) this); } executableEstimatedDuration = DEFAULT_ESTIMATED_DURATION; queue.scheduleMaintenance(); }
/** * Actually persists a node on disk. * * @param node the node to be persisted. * @throws IOException if the node could not be persisted. */ private void persistNode(final @Nonnull Node node) throws IOException { // no need for a full save() so we just do the minimum if (node instanceof EphemeralNode) { Util.deleteRecursive(new File(getNodesDir(), node.getNodeName())); } else { XmlFile xmlFile = new XmlFile(Jenkins.XSTREAM, new File(new File(getNodesDir(), node.getNodeName()), "config.xml")); xmlFile.write(node); SaveableListener.fireOnChange(this, xmlFile); } jenkins.getQueue().scheduleMaintenance(); }
/** * Cancel previous quiet down Jenkins - preparation for a restart */ @RequirePOST // TODO the cancel link needs to be updated accordingly public synchronized HttpRedirect doCancelQuietDown() { checkPermission(ADMINISTER); isQuietingDown = false; getQueue().scheduleMaintenance(); return new HttpRedirect("."); }
/** * Wipes out all the items currently in the queue, as if all of them are cancelled at once. */ public void clear() { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); lock.lock(); try { try { for (WaitingItem i : new ArrayList<WaitingItem>( waitingList)) // copy the list as we'll modify it in the loop i.cancel(this); blockedProjects.cancelAll(); pendings.cancelAll(); buildables.cancelAll(); } finally { updateSnapshot(); } } finally { lock.unlock(); } scheduleMaintenance(); }
getQueue().scheduleMaintenance(); for (ComputerListener cl : ComputerListener.all()) { try {
scheduleMaintenance(); // let an executor know that a new item is in the queue. return ScheduleResult.created(added); if (queueUpdated) scheduleMaintenance();
@Override @RequirePOST public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { super.doConfigSubmit(req,rsp); updateTransientActions(); // notify the queue as the project might be now tied to different node Jenkins.getInstance().getQueue().scheduleMaintenance(); // this is to reflect the upstream build adjustments done above Jenkins.getInstance().rebuildDependencyGraphAsync(); }
resetWorkUnit("went off-line before the task's worker thread started"); owner.removeExecutor(this); queue.scheduleMaintenance(); return; resetWorkUnit("was removed before the task's worker thread started"); owner.removeExecutor(this); queue.scheduleMaintenance(); return;
Jenkins.get().getQueue().scheduleMaintenance();
private void finish2() { for (RuntimeException e1 : owner.getTerminatedBy()) { LOGGER.log(Level.FINE, String.format("%s termination trace", getName()), e1); } owner.removeExecutor(this); if (this instanceof OneOffExecutor) { owner.remove((OneOffExecutor) this); } queue.scheduleMaintenance(); }
/** * Cancel previous quiet down Jenkins - preparation for a restart */ @RequirePOST // TODO the cancel link needs to be updated accordingly public synchronized HttpRedirect doCancelQuietDown() { checkPermission(ADMINISTER); isQuietingDown = false; getQueue().scheduleMaintenance(); return new HttpRedirect("."); }
@CLIMethod(name = "cancel-quiet-down") public synchronized HttpRedirect doCancelQuietDown() { checkPermission(ADMINISTER); isQuietingDown = false; getQueue().scheduleMaintenance(); return new HttpRedirect("."); }
@CLIMethod(name = "cancel-quiet-down") public synchronized HttpRedirect doCancelQuietDown() { checkPermission(ADMINISTER); isQuietingDown = false; getQueue().scheduleMaintenance(); return new HttpRedirect("."); }
@CLIMethod(name = "cancel-quiet-down") public synchronized HttpRedirect doCancelQuietDown() { checkPermission(ADMINISTER); isQuietingDown = false; getQueue().scheduleMaintenance(); return new HttpRedirect("."); }
@CLIMethod(name = "cancel-quiet-down") public synchronized HttpRedirect doCancelQuietDown() { checkPermission(ADMINISTER); isQuietingDown = false; getQueue().scheduleMaintenance(); return new HttpRedirect("."); }
/** * Wipes out all the items currently in the queue, as if all of them are cancelled at once. */ @CLIMethod(name="clear-queue") public synchronized void clear() { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); for (WaitingItem i : waitingList) i.onCancelled(); waitingList.clear(); blockedProjects.cancelAll(); buildables.cancelAll(); scheduleMaintenance(); }
/** * Wipes out all the items currently in the queue, as if all of them are cancelled at once. */ @CLIMethod(name="clear-queue") public synchronized void clear() { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); for (WaitingItem i : waitingList) i.onCancelled(); waitingList.clear(); blockedProjects.cancelAll(); buildables.cancelAll(); scheduleMaintenance(); }
/** * Wipes out all the items currently in the queue, as if all of them are cancelled at once. */ @CLIMethod(name="clear-queue") public synchronized void clear() { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); for (WaitingItem i : waitingList) i.onCancelled(); waitingList.clear(); blockedProjects.cancelAll(); buildables.cancelAll(); scheduleMaintenance(); }
/** * Wipes out all the items currently in the queue, as if all of them are * cancelled at once. */ @CLIMethod(name = "clear-queue") public synchronized void clear() { Hudson.getInstance().checkPermission(Hudson.ADMINISTER); for (WaitingItem i : waitingList) { i.onCancelled(); } waitingList.clear(); blockedProjects.cancelAll(); buildables.cancelAll(); scheduleMaintenance(); }
@Override @RequirePOST public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { super.doConfigSubmit(req,rsp); updateTransientActions(); // notify the queue as the project might be now tied to different node Jenkins.getInstance().getQueue().scheduleMaintenance(); // this is to reflect the upstream build adjustments done above Jenkins.getInstance().rebuildDependencyGraphAsync(); }