use of com.walmartlabs.concord.svm.MultiException in project concord by walmartlabs.
the class Main method main.
public static void main(String[] args) throws Exception {
RunnerConfiguration runnerCfg = readRunnerConfiguration(args);
// create the inject with all dependencies and services available before
// the actual process' working directory is ready. It allows us to load
// all dependencies and have them available in "pre-fork" situations
Injector injector = InjectorFactory.createDefault(runnerCfg);
try {
ProcessConfiguration processCfg = injector.getInstance(ProcessConfiguration.class);
ApiClient apiClient = injector.getInstance(ApiClient.class);
ProcessHeartbeat heartbeat = new ProcessHeartbeat(apiClient, processCfg.instanceId(), runnerCfg.api().maxNoHeartbeatInterval());
heartbeat.start();
Main main = injector.getInstance(Main.class);
main.execute();
System.exit(0);
} catch (MultiException e) {
log.error(e.getMessage());
System.exit(1);
} catch (Throwable t) {
log.error("", t);
System.exit(1);
}
}
Aggregations