fix:调整核心线程数
This commit is contained in:
parent
5dcfa60056
commit
6235112c4b
@ -57,9 +57,9 @@ public class ShopBatchSubmitListener extends AnalysisEventListener<SxGoosModelEx
|
|||||||
this.syncThirdDataService = syncThirdDataService;
|
this.syncThirdDataService = syncThirdDataService;
|
||||||
this.syncStoreSpecsService = syncStoreSpecsService;
|
this.syncStoreSpecsService = syncStoreSpecsService;
|
||||||
// 创建线程池(根据CPU核心数优化)
|
// 创建线程池(根据CPU核心数优化)
|
||||||
int corePoolSize = Runtime.getRuntime().availableProcessors();
|
// int corePoolSize = Runtime.getRuntime().availableProcessors();
|
||||||
// log.info("核心线程数量{}", corePoolSize);
|
// log.info("核心线程数量{}", corePoolSize);
|
||||||
this.executorService = Executors.newFixedThreadPool(corePoolSize);
|
this.executorService = Executors.newFixedThreadPool(6);
|
||||||
this.futures = new ArrayList<>();
|
this.futures = new ArrayList<>();
|
||||||
this.success = new AtomicInteger();
|
this.success = new AtomicInteger();
|
||||||
this.fails = new AtomicInteger();
|
this.fails = new AtomicInteger();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user