diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index b87910ba..540e542a 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -45,10 +45,7 @@ import io.renren.modules.sys.dao.SysDeptDao; import io.renren.modules.sys.dto.SysUserDTO; import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysUserService; -import okhttp3.FormBody; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; +import okhttp3.*; import org.activiti.engine.HistoryService; import org.activiti.engine.history.HistoricProcessInstance; import org.activiti.engine.history.HistoricProcessInstanceQuery; @@ -85,6 +82,16 @@ public class ResourceServiceImpl extends CrudServiceImpl knowledgeUUID = jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库' AND note1 IS NOT NULL FOR UPDATE;", String.class).stream().distinct().collect(Collectors.toList()); - final int pageSize = 100; - final OkHttpClient client = new OkHttpClient(); + final int pageSize = cpuNUm * 10; Arrays.stream(catalogIds).map(index -> { logger.info("处理:" + index); CopyOnWriteArrayList task = new CopyOnWriteArrayList<>();