use of com.hubspot.singularity.managed.SingularityPreJettyLifecycle in project Singularity by HubSpot.
the class SingularityAbort method abort.
public void abort(AbortReason abortReason, Optional<Throwable> throwable) {
if (!aborting.getAndSet(true)) {
try {
sendAbortNotification(abortReason, throwable);
SingularityLifecycleManaged lifecycle = injector.getInstance(SingularityLifecycleManaged.class);
SingularityPreJettyLifecycle preJettyLifecycle = injector.getInstance(SingularityPreJettyLifecycle.class);
try {
preJettyLifecycle.stop();
lifecycle.stop();
} catch (Throwable t) {
LOG.error("While shutting down", t);
}
flushLogs();
} finally {
exit();
}
}
}
Aggregations