Skip to content

Commit

Permalink
removed all delays in shutdown process
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7143 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Sep 14, 2010
1 parent 906c572 commit 3c0e07b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion htroot/ConfigUpdate_p.java
Expand Up @@ -134,7 +134,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
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");
}
Expand Down
2 changes: 1 addition & 1 deletion htroot/Steering.java
Expand Up @@ -58,7 +58,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje

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;
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/search/Switchboard.java
Expand Up @@ -1623,7 +1623,7 @@ public boolean cleanupJob() {
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");
}
}
Expand Down
6 changes: 3 additions & 3 deletions source/de/anomic/yacy/yacyRelease.java
Expand Up @@ -417,7 +417,7 @@ public static void restart() {
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);
}
Expand Down Expand Up @@ -456,7 +456,7 @@ public static void restart() {
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);
}
Expand Down Expand Up @@ -551,7 +551,7 @@ public static void deployRelease(final File releaseFile) {
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);
}
Expand Down
2 changes: 1 addition & 1 deletion source/net/yacy/gui/YaCyApp.java
Expand Up @@ -88,7 +88,7 @@ public Op(JFrame app, String host, int port) {
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);
}
Expand Down

0 comments on commit 3c0e07b

Please sign in to comment.