测试线程池
parent
9a342d1cd8
commit
5c8e646819
|
@ -10,6 +10,7 @@ import com.muyu.mapper.TaskMapper;
|
|||
import com.muyu.service.*;
|
||||
import com.muyu.task.feign.DataValueClient;
|
||||
import com.muyu.task.feign.RuleFeign;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -230,12 +231,17 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
|
|||
return "success";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private void selectAndAdd(Long databaseId,Long basicId,String sql,Long tableId,
|
||||
HashMap<String,String> newAndOldMap,Long finalFirstArray ,Integer two) {
|
||||
log.info("开始查询数据");
|
||||
log.info("sql{}", sql);
|
||||
log.info("数组为{},,{}", finalFirstArray, two);
|
||||
DataValue[][] tableValue = dataValueClient.findTableValueToArray(databaseId, sql, finalFirstArray, two);
|
||||
System.out.println("aaa"+tableValue.length);
|
||||
System.out.println("aaa"+tableValue.length);
|
||||
System.out.println("aaa"+tableValue.length);
|
||||
System.out.println("aaa"+tableValue.length);
|
||||
log.info("远程调用完毕,调用数量{}", tableValue.length);
|
||||
for (DataValue[] dataValues : tableValue) {
|
||||
for (DataValue dataValue : dataValues) {
|
||||
|
|
|
@ -298,8 +298,9 @@ public class PriorityThreadPool {
|
|||
try {
|
||||
log.info("开始执行任务");
|
||||
task.run();
|
||||
log.info("执行任务完毕??");
|
||||
|
||||
} finally {
|
||||
log.info("执行任务完毕??");
|
||||
lowPrioritySemaphore.release();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -11,6 +11,7 @@ nacos:
|
|||
# text cloud-2112
|
||||
# Spring
|
||||
spring:
|
||||
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
application:
|
||||
|
@ -19,13 +20,14 @@ spring:
|
|||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
|
||||
cloud:
|
||||
# openfeign:
|
||||
# client:
|
||||
# config:
|
||||
# default:
|
||||
# connectTimeout: 500000 # 连接超时时间,单位为毫秒
|
||||
# readTimeout: 500000 # 读取超时时间,单位为毫秒
|
||||
openfeign:
|
||||
client:
|
||||
config:
|
||||
default:
|
||||
connectTimeout: 5000
|
||||
readTimeout: 5000
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
|
@ -68,10 +70,4 @@ mybatis-plus:
|
|||
logic-not-delete-value: 0 # 逻辑未删除标记值,例如设置为 0 表示未删除
|
||||
banner: false # 关闭控制台打印的 MyBatis-Plus Banner
|
||||
|
||||
#feign:
|
||||
# client:
|
||||
# config:
|
||||
# ## default 设置的全局超时时间,指定服务名称可以设置单个服务的超时时间
|
||||
# default:
|
||||
# connectTimeout: 5000
|
||||
# readTimeout: 5000
|
||||
|
||||
|
|
Loading…
Reference in New Issue