Skip to content
Permalink
Browse files

Fixed NAS-2427 - added 10 seconds sleep to startall.bat and killall.bat

  • Loading branch information...
svcarlsen committed Jun 24, 2015
1 parent 129ec48 commit 334122c8ae700ec27bc1c9247e08de260d53d642
@@ -231,7 +231,7 @@

// other constants
/** The amount of seconds to wait for the restart script. */
public static final int WAIT_TIME_DURING_RESTART = 5;
public static final int WAIT_TIME_DURING_RESTART = 10;
/** The number of milliseconds on a second. 1000. */
static final int TIME_SECOND_IN_MILLISECONDS = 1000;
/** The minimum number of arguments required. */
@@ -48,6 +48,9 @@ private ScriptConstants() {
static final String BIN_BASH_COMMENT = "#!/bin/bash";
/** The call for running a batch script from another batch script. */
static final String OPERATING_SYSTEM_WINDOWS_RUN_BATCH_FILE = "\"C:\\Program Files\\Bitvise WinSSHD\\bvRun\" -brj -new -cmd=";
/** The call to the wait.vbs script that waits 10 seconds. */
static final String OPERATING_SYSTEM_WINDOWS_10_SECONDS_WAIT = ScriptConstants.CSCRIPT + Constants.SPACE
+ Constants.SCRIPT_NAME_WAIT + Constants.EXTENSION_VBS_FILES;
/** Ddk.netarkivet.settings.file=. */
static final String OPTION_SETTINGS = "Ddk.netarkivet.settings.file=";
/** Ddk.netarkivet.settings.file=\"\". */
@@ -374,7 +374,10 @@ protected void createOSLocalKillAllScript(File directory) throws IOFailure {
killPrinter.print(Constants.QUOTE_MARK);
killPrinter.println();
}
} finally {
// Add 10 seconds timeout to allow the shutdown to complete before exiting the ssh connection
killPrinter.print(ScriptConstants.OPERATING_SYSTEM_WINDOWS_10_SECONDS_WAIT);
killPrinter.println();
} finally {
// close script
killPrinter.close();
}
@@ -414,7 +417,10 @@ protected void createOSLocalStartAllScript(File directory) throws IOFailure {
startPrinter.print(Constants.QUOTE_MARK);
startPrinter.println();
}
} finally {
// Add 10 seconds timeout to allow the Starting to complete before exiting the ssh connection
startPrinter.print(ScriptConstants.OPERATING_SYSTEM_WINDOWS_10_SECONDS_WAIT);
startPrinter.println();
} finally {
// close script
startPrinter.close();
}

0 comments on commit 334122c

Please sign in to comment.
You can’t perform that action at this time.