测试线程池

master
陈思豪 2024-09-09 12:01:32 +08:00
parent a40f090fab
commit 6ebb410ecd
2 changed files with 23 additions and 15 deletions

View File

@ -232,21 +232,22 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
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);
log.info("远程调用完毕,调用数量{}",tableValue.length);
for (DataValue[] dataValues : tableValue) {
for (DataValue dataValue : dataValues) {
String key = dataValue.getKey();
String newKey = newAndOldMap.get(key);
dataValue.setKey(newKey);
}
log.info("开始查询数据");
log.info("sql{}", sql);
log.info("数组为{}{}", finalFirstArray, two);
DataValue[][] tableValue = dataValueClient.findTableValueToArray(databaseId, sql, finalFirstArray, two);
log.info("远程调用完毕,调用数量{}", tableValue.length);
for (DataValue[] dataValues : tableValue) {
for (DataValue dataValue : dataValues) {
String key = dataValue.getKey();
String newKey = newAndOldMap.get(key);
dataValue.setKey(newKey);
}
Result result = dataValueClient.addProduct(basicId, tableId, tableValue);
log.info("添加结果为{}", result);
log.info("添加到queue里成功");
}
Result result = dataValueClient.addProduct(basicId, tableId, tableValue);
log.info("添加结果为{}", result);
log.info("添加到queue里成功");
}
// private void selectAndAdd(Integer count,Long databaseId,Long basicId,String sql,Long tableId,
// HashMap<String,String> newAndOldMap,Integer two) {
@ -361,7 +362,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskInfo> implement
// return Integer.compare(o.geWeight().getWeight(), this.weight.getWeight());
// }
// }
}
// @Autowired
// private NodeRuleService nodeRuleService;

View File

@ -67,3 +67,11 @@ mybatis-plus:
logic-delete-value: 1 # 逻辑删除标记值,例如设置为 1 表示已删除
logic-not-delete-value: 0 # 逻辑未删除标记值,例如设置为 0 表示未删除
banner: false # 关闭控制台打印的 MyBatis-Plus Banner
feign:
client:
config:
## default 设置的全局超时时间,指定服务名称可以设置单个服务的超时时间
default:
connectTimeout: 5000
readTimeout: 5000