09052203:对这个资产展示使用线程池的方法去做,第五次优化代码
parent
dfa2e92b93
commit
845eaeedd8
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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<>();
|
||||
|
|
Loading…
Reference in New Issue