From 3c0e07ba726c15b3a394f1cb04df0b078acbe019 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 14 Sep 2010 09:13:28 +0000 Subject: [PATCH] removed all delays in shutdown process git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7143 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/ConfigUpdate_p.java | 2 +- htroot/Steering.java | 2 +- source/de/anomic/search/Switchboard.java | 2 +- source/de/anomic/yacy/yacyRelease.java | 6 +++--- source/net/yacy/gui/YaCyApp.java | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htroot/ConfigUpdate_p.java b/htroot/ConfigUpdate_p.java index 91d2f2646..1f5fb7376 100644 --- a/htroot/ConfigUpdate_p.java +++ b/htroot/ConfigUpdate_p.java @@ -134,7 +134,7 @@ public class ConfigUpdate_p { prop.put("candeploy_autoUpdate", "4"); } else { 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"); prop.put("candeploy_autoUpdate", "1"); } diff --git a/htroot/Steering.java b/htroot/Steering.java index 7a4b69982..548825d59 100644 --- a/htroot/Steering.java +++ b/htroot/Steering.java @@ -58,7 +58,7 @@ public class Steering { if (post.containsKey("shutdown")) { 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"); return prop; diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.java index d881fc4af..d955d0600 100644 --- a/source/de/anomic/search/Switchboard.java +++ b/source/de/anomic/search/Switchboard.java @@ -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)"); } else { 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"); } } diff --git a/source/de/anomic/yacy/yacyRelease.java b/source/de/anomic/yacy/yacyRelease.java index 39610fd60..4a8028371 100644 --- a/source/de/anomic/yacy/yacyRelease.java +++ b/source/de/anomic/yacy/yacyRelease.java @@ -417,7 +417,7 @@ public final class yacyRelease extends yacyVersion { Log.logInfo("RESTART", "wrote restart-script to " + scriptFile.getAbsolutePath()); OS.execAsynchronous(scriptFile); Log.logInfo("RESTART", "script is running"); - sb.terminate(5000, "windows restart"); + sb.terminate(10, "windows restart"); } catch (final IOException 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()); OS.execAsynchronous(scriptFile); Log.logInfo("RESTART", "script is running"); - sb.terminate(5000, "unix restart"); + sb.terminate(10, "unix restart"); } catch (final IOException e) { Log.logSevere("RESTART", "restart failed", e); } @@ -551,7 +551,7 @@ public final class yacyRelease extends yacyVersion { OS.execAsynchronous(scriptFile); Log.logInfo("UPDATE", "script is running"); 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) { Log.logSevere("UPDATE", "update failed", e); } diff --git a/source/net/yacy/gui/YaCyApp.java b/source/net/yacy/gui/YaCyApp.java index fc5b7d0cd..149facb43 100644 --- a/source/net/yacy/gui/YaCyApp.java +++ b/source/net/yacy/gui/YaCyApp.java @@ -88,7 +88,7 @@ public class YaCyApp { public void closeAndExit() { if (app != null) app.setVisible(false); // fake closing //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(); //System.exit(0); }