mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-23 12:35:07 +08:00
引入第三方平台任务线程池
This commit is contained in:
@@ -73,6 +73,9 @@ public class PileRabbitListener {
|
||||
// 引入线程池
|
||||
private ThreadPoolTaskExecutor executor = SpringUtils.getBean("threadPoolTaskExecutor");
|
||||
|
||||
// 引入第三方平台任务线程池
|
||||
private ThreadPoolTaskExecutor thirdpartyTaskExecutor = SpringUtils.getBean("thirdpartyTaskExecutor");
|
||||
|
||||
// ========================= 消费消息 ========================== //
|
||||
// @RabbitListener(queues = "ykc.pileLogin-topic.device-group")
|
||||
// public void testRabbitMQMessage(String msg) {
|
||||
@@ -378,7 +381,7 @@ public class PileRabbitListener {
|
||||
} catch (Exception e) {
|
||||
log.error("统一推送第三方平台实时数据 error,", e);
|
||||
}
|
||||
}, executor);
|
||||
}, thirdpartyTaskExecutor);
|
||||
|
||||
// 异步推送第三方平台实时数据V2
|
||||
CompletableFuture.runAsync(() -> {
|
||||
@@ -387,7 +390,7 @@ public class PileRabbitListener {
|
||||
} catch (Exception e) {
|
||||
log.error("统一推送第三方平台实时数据V2 error, ", e);
|
||||
}
|
||||
}, executor);
|
||||
}, thirdpartyTaskExecutor);
|
||||
|
||||
if (StringUtils.equals(connectorStatus, Constants.ONE)) {
|
||||
// 故障
|
||||
@@ -398,7 +401,7 @@ public class PileRabbitListener {
|
||||
} catch (Exception e) {
|
||||
log.error("统一推送第三方平台告警信息 error, ", e);
|
||||
}
|
||||
}, executor);
|
||||
}, thirdpartyTaskExecutor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user