09041958:优化同步资产结构

master
冷调 2024-09-04 19:58:18 +08:00
parent e6e4f1213a
commit 596f8c673c
1 changed files with 4 additions and 1 deletions

View File

@ -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);
});