Merge branch 'master' into optimize-memory-cache

This commit is contained in:
LamGC 2020-06-15 17:42:51 +08:00
commit 32db952e63
2 changed files with 9 additions and 3 deletions

View File

@ -166,6 +166,12 @@
<groupId>net.lamgc</groupId> <groupId>net.lamgc</groupId>
<artifactId>PixivLoginProxyServer</artifactId> <artifactId>PixivLoginProxyServer</artifactId>
<version>1.1.1</version> <version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.squareup</groupId> <groupId>com.squareup</groupId>

View File

@ -46,11 +46,11 @@ public class BotEventHandler implements EventHandler {
* 消息事件执行器 * 消息事件执行器
*/ */
private final static EventExecutor executor = new EventExecutor(new TimeLimitThreadPoolExecutor( private final static EventExecutor executor = new EventExecutor(new TimeLimitThreadPoolExecutor(
180000, // 3min 180000, // 3minThr
Math.max(Runtime.getRuntime().availableProcessors(), 4), Math.max(Runtime.getRuntime().availableProcessors(), 4),
Math.min(Runtime.getRuntime().availableProcessors() * 2, 32), Math.min(Math.max(Runtime.getRuntime().availableProcessors(), 4), 32),
30L, 30L,
TimeUnit.SECONDS, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(1536), new LinkedBlockingQueue<>(1536),
new ThreadFactoryBuilder() new ThreadFactoryBuilder()
.setNameFormat("CommandProcess-%d") .setNameFormat("CommandProcess-%d")