@Override public void run() { Node n = c.getNode(); if (n!=null && n.isHoldOffLaunchUntilSave()) return; if (!nextCheck.containsKey(c) || startRun > nextCheck.get(c)) { // at the moment I don't trust strategies to wait more than 60 minutes // strategies need to wait at least one minute final long waitInMins = Math.max(1, Math.min(60, c.getRetentionStrategy().check(c))); nextCheck.put(c, startRun + waitInMins*1000*60 /*MINS->MILLIS*/); } } });
if (!n.isHoldOffLaunchUntilSave() && automaticSlaveLaunch) { RetentionStrategy retentionStrategy = c.getRetentionStrategy(); if (retentionStrategy != null) {
public boolean superIsHoldOffLaunchUntilSave() { return super.isHoldOffLaunchUntilSave(); }
@Override public void run() { Node n = c.getNode(); if (n!=null && n.isHoldOffLaunchUntilSave()) return; if (!nextCheck.containsKey(c) || startRun > nextCheck.get(c)) { // at the moment I don't trust strategies to wait more than 60 minutes // strategies need to wait at least one minute final long waitInMins = Math.max(1, Math.min(60, c.getRetentionStrategy().check(c))); nextCheck.put(c, startRun + waitInMins*1000*60 /*MINS->MILLIS*/); } } });
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") protected void doRun() { final long startRun = System.currentTimeMillis(); for (Computer c : Hudson.getInstance().getComputers()) { Node n = c.getNode(); if (n!=null && n.isHoldOffLaunchUntilSave()) continue; if (!nextCheck.containsKey(c) || startRun > nextCheck.get(c)) { // at the moment I don't trust strategies to wait more than 60 minutes // strategies need to wait at least one minute final long waitInMins = Math.min(1, Math.max(60, c.getRetentionStrategy().check(c))); nextCheck.put(c, startRun + waitInMins*1000*60 /*MINS->MILLIS*/); } } } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") protected void doRun() { final long startRun = System.currentTimeMillis(); for (Computer c : Hudson.getInstance().getComputers()) { Node n = c.getNode(); if (n!=null && n.isHoldOffLaunchUntilSave()) continue; if (!nextCheck.containsKey(c) || startRun > nextCheck.get(c)) { // at the moment I don't trust strategies to wait more than 60 minutes // strategies need to wait at least one minute final long waitInMins = Math.min(1, Math.max(60, c.getRetentionStrategy().check(c))); nextCheck.put(c, startRun + waitInMins*1000*60 /*MINS->MILLIS*/); } } } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") protected void doRun() { final long startRun = System.currentTimeMillis(); for (Computer c : Hudson.getInstance().getComputers()) { Node n = c.getNode(); if (n!=null && n.isHoldOffLaunchUntilSave()) continue; if (!nextCheck.containsKey(c) || startRun > nextCheck.get(c)) { // at the moment I don't trust strategies to wait more than 60 minutes // strategies need to wait at least one minute final long waitInMins = Math.min(1, Math.max(60, c.getRetentionStrategy().check(c))); nextCheck.put(c, startRun + waitInMins*1000*60 /*MINS->MILLIS*/); } } } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") protected void doRun() { final long startRun = System.currentTimeMillis(); for (Computer c : Hudson.getInstance().getComputers()) { Node n = c.getNode(); if (n != null && n.isHoldOffLaunchUntilSave()) { continue; } if (!nextCheck.containsKey(c) || startRun > nextCheck.get(c)) { // at the moment I don't trust strategies to wait more than 60 minutes // strategies need to wait at least one minute final long waitInMins = Math.min(1, Math.max(60, c.getRetentionStrategy().check(c))); nextCheck.put(c, startRun + waitInMins * 1000 * 60 /*MINS->MILLIS*/); } } } }
@Override public boolean isHoldOffLaunchUntilSave() { initPython(); if (pexec.isImplemented(2)) { return pexec.execPythonBool("is_hold_off_launch_until_save"); } else { return super.isHoldOffLaunchUntilSave(); } }
if (!n.isHoldOffLaunchUntilSave() && automaticSlaveLaunch) { RetentionStrategy retentionStrategy = c.getRetentionStrategy(); if (retentionStrategy != null) {