Skip to content

Commit

Permalink
Merge pull request #129 from smukil/restart_server_process_if_down
Browse files Browse the repository at this point in the history
Restart Dynomite process if it stops running
  • Loading branch information
smukil authored Dec 14, 2020
2 parents 8dfc48f + 90376d0 commit 032d365
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,17 @@ public void execute() throws Exception {
instanceState.setStorageAlive(storageProxy.isAlive());
logger.info(String.format("ProcessMonitor state: %s, time elapsted to check (micros): %s",
instanceState, stopwatch.elapsed(MICROSECONDS)));


if((!instanceState.isStorageProxyProcessAlive())) {
if (!instanceState.isStorageAlive()) {
logger.error("FATAL: Redis is down.");
// TODO: Take appropriate action.
}
else {
logger.info("Detected Dynomite process is not running. Restarting dynomite.");
}
dynomiteProcess.start();
}
/*
if((!instanceState.isStorageProxyAlive() && instanceState.isStorageProxyProcessAlive())) {
if (!instanceState.isStorageAlive()) {
Expand Down

0 comments on commit 032d365

Please sign in to comment.