09052203:对这个资产展示使用线程池的方法去做,第五次优化代码

master
冷调 2024-09-05 22:03:16 +08:00
parent dfa2e92b93
commit 845eaeedd8
2 changed files with 4 additions and 4 deletions

View File

@ -107,9 +107,9 @@ public class MysqlPool implements BasePool<Connection>{
return mysqlConn;
}
// if ((System.currentTimeMillis() - startTime)>this.etlDataScore.getMaxWaitTime()){
// throw new MysqlConnException("连接超时!");
// }
if ((System.currentTimeMillis() - startTime)>this.etlDataScore.getMaxWaitTime()){
throw new MysqlConnException("连接超时!");
}
return null;
}

View File

@ -37,7 +37,7 @@ public class DataValueServiceImpl extends ServiceImpl<DataValueMapper, DataValue
// 每批次查询的记录数
private static final int BATCH_SIZE = 1000;
// 线程池大小
private static final int THREAD_POOL_SIZE = 100;
private static final int THREAD_POOL_SIZE = 19;
@Override
public List<DataValue> findTableValue(DataValueModel dataValueModel) {
List<DataValue> dataValueList = new ArrayList<>();