develop
hanrenchun 7 months ago
parent dcf9829a1d
commit 905581d13d

@ -55,24 +55,24 @@ public class AlarmInfoTask {
Page<JcjJjxxViewMysql> page = new Page<>(1, 200);
List<JcjJjxxViewMysql> resultList = jjxxViewMysqlService.page(page, queryWrapper).getRecords();
CountDownLatch latch = new CountDownLatch(resultList.size());
ExecutorService JjxxPool = Executors.newFixedThreadPool(5);
// CountDownLatch latch = new CountDownLatch(resultList.size());
// ExecutorService JjxxPool = Executors.newFixedThreadPool(5);
for (JcjJjxxViewMysql bean : resultList) {
JjxxPool.submit(() -> {
// JjxxPool.submit(() -> {
cleanJjxx(bean);
logger.info("清洗完成");
latch.countDown();
});
// latch.countDown();
// });
}
try {
// Wait for all threads to complete
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
// try {
// // Wait for all threads to complete
// latch.await();
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// 关闭线程池
JjxxPool.shutdown();
// JjxxPool.shutdown();
} catch (Exception e) {
logger.info(StringKit.getTrace(e));
}

Loading…
Cancel
Save