Zond: перезапустить процесс в случае краша
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
group = 'asys'
|
||||
version = '0.7.11-SNAPSHOT'
|
||||
version = '0.7.12-SNAPSHOT'
|
||||
|
||||
apply plugin: 'application'
|
||||
|
||||
|
||||
@@ -98,7 +98,8 @@ public class ZondCommandHandler implements CommandHandler {
|
||||
killProcess();
|
||||
});
|
||||
code = executor.execute(commandLine);
|
||||
} catch (ExecuteException ignore) {
|
||||
} catch (ExecuteException e) {
|
||||
code = e.getExitValue();
|
||||
} catch (IOException e) {
|
||||
Shell.getInstance().getOutput().println("Exception message: " + e.getMessage());
|
||||
code = -99;
|
||||
@@ -119,6 +120,9 @@ public class ZondCommandHandler implements CommandHandler {
|
||||
} else if (flagForceRestartProcess) {
|
||||
_try = 0;
|
||||
flagForceRestartProcess = false;
|
||||
} else if (code != 0 && code != -99) {
|
||||
Shell.getInstance().getOutput().println("[!] Try start process again...");
|
||||
_try = 0;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user