From 6b9da8fa479add32212b1603df38d40ca314aedd Mon Sep 17 00:00:00 2001 From: tesshucom Date: Wed, 13 Jul 2022 23:45:25 +0900 Subject: [PATCH] Change shutdown timeout to 29 seconds - In a general environment, it is often set to about 30 seconds. - For this reason, important processing had a grace period of about 30 seconds. - This fix will change the entire shutdown phase to 29 seconds --- .../jpsonic/util/concurrent/ExecutorConfiguration.java | 8 ++++---- jpsonic-main/src/main/resources/application.properties | 2 +- jpsonic-main/src/test/resources/application.properties | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jpsonic-main/src/main/java/com/tesshu/jpsonic/util/concurrent/ExecutorConfiguration.java b/jpsonic-main/src/main/java/com/tesshu/jpsonic/util/concurrent/ExecutorConfiguration.java index 9d7ec4891..ac2716267 100644 --- a/jpsonic-main/src/main/java/com/tesshu/jpsonic/util/concurrent/ExecutorConfiguration.java +++ b/jpsonic-main/src/main/java/com/tesshu/jpsonic/util/concurrent/ExecutorConfiguration.java @@ -42,10 +42,10 @@ public class ExecutorConfiguration { private static final Logger LOG = LoggerFactory.getLogger(ExecutorConfiguration.class); - protected static final int SHORT_AWAIT_TERMINATION = 20_000; - protected static final int PODCAST_DOWNLOAD_AWAIT_TERMINATION = 30_000; - protected static final int PODCAST_REFRESH_AWAIT_TERMINATION = 30_000; - protected static final int SCAN_AWAIT_TERMINATION = 30_000; + protected static final int SHORT_AWAIT_TERMINATION = 10_000; + protected static final int PODCAST_DOWNLOAD_AWAIT_TERMINATION = 25_000; + protected static final int PODCAST_REFRESH_AWAIT_TERMINATION = 25_000; + protected static final int SCAN_AWAIT_TERMINATION = 25_000; private final ShortTaskPoolConfiguration poolConf; diff --git a/jpsonic-main/src/main/resources/application.properties b/jpsonic-main/src/main/resources/application.properties index 95d86766f..2ad2f62df 100644 --- a/jpsonic-main/src/main/resources/application.properties +++ b/jpsonic-main/src/main/resources/application.properties @@ -20,7 +20,7 @@ logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- %-40.40logger{32} : %m% server.shutdown=graceful -spring.lifecycle.timeout-per-shutdown-phase=40s +spring.lifecycle.timeout-per-shutdown-phase=29s spring.mvc.async.request-timeout=300000 server.max-http-header-size=65536 diff --git a/jpsonic-main/src/test/resources/application.properties b/jpsonic-main/src/test/resources/application.properties index 86408bdf6..8f7b105c4 100644 --- a/jpsonic-main/src/test/resources/application.properties +++ b/jpsonic-main/src/test/resources/application.properties @@ -20,7 +20,7 @@ DatabaseConfigEmbedUsername=sa DatabaseConfigEmbedPassword= server.shutdown=graceful -spring.lifecycle.timeout-per-shutdown-phase=40s +spring.lifecycle.timeout-per-shutdown-phase=29s spring.mvc.async.request-timeout=300000 server.max-http-header-size=65536