Skip to content

Commit

Permalink
exit app if unrecoverable exception thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
artntek committed May 9, 2024
1 parent 92a36da commit 54b1944
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/main/java/org/dataone/cn/indexer/IndexWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,19 @@ public class IndexWorker {

/**
* Commandline main for the IndexWorker to be started.
* @param args
* @throws TimeoutException
* @throws IOException
* @throws ServiceFailure
* @param args (not used -- command line args)
*/
public static void main(String[] args) throws IOException, TimeoutException, ServiceFailure {
public static void main(String[] args) {
logger.info("IndexWorker.main - Starting index worker...");
String propertyFile = null;
loadExternalPropertiesFile(propertyFile);
IndexWorker worker = new IndexWorker();
worker.start();
try {
IndexWorker worker = new IndexWorker();
worker.start();
} catch (Exception e) {
logger.fatal("IndexWorker.main() exiting due to fatal error: " + e.getMessage(), e);
System.exit(1);
}
startLivenessProbe();
}

Expand Down

0 comments on commit 54b1944

Please sign in to comment.