removed all delays in shutdown process

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7143 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 906c572621
commit 3c0e07ba72

@ -134,7 +134,7 @@ public class ConfigUpdate_p {
prop.put("candeploy_autoUpdate", "4"); prop.put("candeploy_autoUpdate", "4");
} else { } else {
yacyRelease.deployRelease(downloaded); yacyRelease.deployRelease(downloaded);
sb.terminate(5000, "manual release update to " + downloaded.getName()); sb.terminate(10, "manual release update to " + downloaded.getName());
sb.getLog().logInfo("AUTO-UPDATE: deploy and restart initiated"); sb.getLog().logInfo("AUTO-UPDATE: deploy and restart initiated");
prop.put("candeploy_autoUpdate", "1"); prop.put("candeploy_autoUpdate", "1");
} }

@ -58,7 +58,7 @@ public class Steering {
if (post.containsKey("shutdown")) { if (post.containsKey("shutdown")) {
Log.logInfo("STEERING", "shutdown request from " + requestIP); Log.logInfo("STEERING", "shutdown request from " + requestIP);
sb.terminate(100, "shutdown request from Steering; ip = " + requestIP); sb.terminate(10, "shutdown request from Steering; ip = " + requestIP);
prop.put("info", "3"); prop.put("info", "3");
return prop; return prop;

@ -1623,7 +1623,7 @@ public final class Switchboard extends serverSwitch {
log.logInfo("AUTO-UPDATE: omiting update because download failed (file cannot be found, is too small or signature is bad)"); log.logInfo("AUTO-UPDATE: omiting update because download failed (file cannot be found, is too small or signature is bad)");
} else { } else {
yacyRelease.deployRelease(downloaded); yacyRelease.deployRelease(downloaded);
terminate(5000, "auto-update to install " + downloaded.getName()); terminate(10, "auto-update to install " + downloaded.getName());
log.logInfo("AUTO-UPDATE: deploy and restart initiated"); log.logInfo("AUTO-UPDATE: deploy and restart initiated");
} }
} }

@ -417,7 +417,7 @@ public final class yacyRelease extends yacyVersion {
Log.logInfo("RESTART", "wrote restart-script to " + scriptFile.getAbsolutePath()); Log.logInfo("RESTART", "wrote restart-script to " + scriptFile.getAbsolutePath());
OS.execAsynchronous(scriptFile); OS.execAsynchronous(scriptFile);
Log.logInfo("RESTART", "script is running"); Log.logInfo("RESTART", "script is running");
sb.terminate(5000, "windows restart"); sb.terminate(10, "windows restart");
} catch (final IOException e) { } catch (final IOException e) {
Log.logSevere("RESTART", "restart failed", e); Log.logSevere("RESTART", "restart failed", e);
} }
@ -456,7 +456,7 @@ public final class yacyRelease extends yacyVersion {
Log.logInfo("RESTART", "wrote restart-script to " + scriptFile.getAbsolutePath()); Log.logInfo("RESTART", "wrote restart-script to " + scriptFile.getAbsolutePath());
OS.execAsynchronous(scriptFile); OS.execAsynchronous(scriptFile);
Log.logInfo("RESTART", "script is running"); Log.logInfo("RESTART", "script is running");
sb.terminate(5000, "unix restart"); sb.terminate(10, "unix restart");
} catch (final IOException e) { } catch (final IOException e) {
Log.logSevere("RESTART", "restart failed", e); Log.logSevere("RESTART", "restart failed", e);
} }
@ -551,7 +551,7 @@ public final class yacyRelease extends yacyVersion {
OS.execAsynchronous(scriptFile); OS.execAsynchronous(scriptFile);
Log.logInfo("UPDATE", "script is running"); Log.logInfo("UPDATE", "script is running");
sb.setConfig("update.time.deploy", System.currentTimeMillis()); sb.setConfig("update.time.deploy", System.currentTimeMillis());
sb.terminate(5000, "auto-deploy for " + releaseFile.getName()); sb.terminate(10, "auto-deploy for " + releaseFile.getName());
} catch (final IOException e) { } catch (final IOException e) {
Log.logSevere("UPDATE", "update failed", e); Log.logSevere("UPDATE", "update failed", e);
} }

@ -88,7 +88,7 @@ public class YaCyApp {
public void closeAndExit() { public void closeAndExit() {
if (app != null) app.setVisible(false); // fake closing if (app != null) app.setVisible(false); // fake closing
//Browser.openBrowser("http://" + host + ":" + port + "/Steering.html?shutdown="); //Browser.openBrowser("http://" + host + ":" + port + "/Steering.html?shutdown=");
de.anomic.search.Switchboard.getSwitchboard().terminate(100, "shutdown request from gui"); de.anomic.search.Switchboard.getSwitchboard().terminate(10, "shutdown request from gui");
Switchboard.shutdown(); Switchboard.shutdown();
//System.exit(0); //System.exit(0);
} }

Loading…
Cancel
Save