mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
[dev] change threadpool config
This commit is contained in:
parent
14b556fe3a
commit
b31b4a819f
@ -59,7 +59,7 @@ public class ThreadPoolConfig {
|
|||||||
public Executor initBackgroundPool() {
|
public Executor initBackgroundPool() {
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
executor.setCorePoolSize(Runtime.getRuntime().availableProcessors());
|
executor.setCorePoolSize(Runtime.getRuntime().availableProcessors());
|
||||||
executor.setMaxPoolSize(Runtime.getRuntime().availableProcessors());
|
executor.setMaxPoolSize(Runtime.getRuntime().availableProcessors() * 2);
|
||||||
executor.setQueueCapacity(8192);
|
executor.setQueueCapacity(8192);
|
||||||
executor.setKeepAliveSeconds(60);
|
executor.setKeepAliveSeconds(60);
|
||||||
executor.setThreadNamePrefix("omsBackgroundPool-");
|
executor.setThreadNamePrefix("omsBackgroundPool-");
|
||||||
|
@ -193,6 +193,7 @@ public class InstanceLogService {
|
|||||||
try {
|
try {
|
||||||
instanceId2LastReportTime.remove(instanceId);
|
instanceId2LastReportTime.remove(instanceId);
|
||||||
CommonUtils.executeWithRetry0(() -> localInstanceLogRepository.deleteByInstanceId(instanceId));
|
CommonUtils.executeWithRetry0(() -> localInstanceLogRepository.deleteByInstanceId(instanceId));
|
||||||
|
log.warn("[InstanceLog-{}] delete local instanceLog successfully.", instanceId);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
log.warn("[InstanceLog-{}] delete local instanceLog failed.", instanceId, e);
|
log.warn("[InstanceLog-{}] delete local instanceLog failed.", instanceId, e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user