09041958:优化同步资产结构
parent
e6e4f1213a
commit
596f8c673c
|
@ -137,7 +137,7 @@ public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSou
|
|||
*/
|
||||
@Override
|
||||
public Integer syncAssetStructure(DataSource etlDataScore) {
|
||||
ExecutorService threadPool = Executors.newFixedThreadPool(10);
|
||||
|
||||
try {
|
||||
if (etlDataScore.getDataType().equals(MYSQL)) {
|
||||
MysqlPool mysqlPool = new MysqlPool(etlDataScore);
|
||||
|
@ -222,6 +222,9 @@ public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSou
|
|||
//根据数据库id和表名查询数据
|
||||
TableInfo table = tableInfoService.selectTableInfoByName(build);
|
||||
|
||||
|
||||
ExecutorService threadPool = Executors.newCachedThreadPool();
|
||||
|
||||
threadPool.submit(() -> {
|
||||
syncData(conn, etlDataScore.getDatabaseName(), table);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue