lyhzzz 1 year ago
parent
commit
cb1b47146e
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/main/java/com/fdkankan/mqcontroller/task/TaskService.java

+ 5 - 0
src/main/java/com/fdkankan/mqcontroller/task/TaskService.java

@@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
 import java.sql.SQLOutput;
@@ -49,6 +50,7 @@ public class TaskService {
     private static final HashMap<String,LinkedBlockingQueue<DelEcsVo>> openMap = new HashMap<>();
 
 
+    @Async
     public void sendMq() {
         checkCount();
         List<MqSendLog> mqSendLogs = mqSendLogService.getNoSendMsg();
@@ -112,6 +114,7 @@ public class TaskService {
         }
     }
 
+    @Async
     public void openEcsList() {
         try {
             HashMap<String, MqQueueConfig> queueMap = queueConfigService.getQueueMap();
@@ -170,6 +173,8 @@ public class TaskService {
     }
 
 
+
+    @Async
     public void delEcsList() {
         try {
             log.info("delEcsList--关闭弹性伸缩数量:{}",delList.size());