Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Batch application does not shutdown #2217

Merged
merged 1 commit into from
Nov 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import javax.annotation.PreDestroy;

import io.micrometer.core.instrument.MeterRegistry;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Expand Down Expand Up @@ -103,11 +101,6 @@ public class ZipkinAutoConfiguration {

private static final Log log = LogFactory.getLog(ZipkinAutoConfiguration.class);

@PreDestroy
void cleanup() {
this.zipkinExecutor.shutdown();
}

/** Limits {@link Sender#check()} to {@code deadlineMillis}. */
static CompletableFuture<CheckResult> checkResult(ExecutorService zipkinExecutor, Sender sender,
long deadlineMillis) {
Expand All @@ -124,6 +117,8 @@ static CompletableFuture<CheckResult> checkResult(ExecutorService zipkinExecutor
result = checkResult == null ? CheckResult.failed(exception) : checkResult;
}
logCheckResult(sender, result);

zipkinExecutor.shutdown();
});
}

Expand Down