ソースを参照

修改弹性伸缩方法

tianboguang 2 年 前
コミット
3b3665d73a

+ 3 - 3
src/main/java/com/fdkankan/contro/schedule/ScheduleJob.java

@@ -1,7 +1,7 @@
 package com.fdkankan.contro.schedule;
 
 import com.fdkankan.rabbitmq.util.RabbitMqProducer;
-import com.fdkankan.rubbersheeting.RubberSheetingUtil;
+import com.fdkankan.rubbersheeting.ScalingService;
 import lombok.extern.log4j.Log4j2;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -25,7 +25,7 @@ public class ScheduleJob {
     private RabbitMqProducer rabbitMqProducer;
 
     @Autowired
-    private RubberSheetingUtil rubberSheetingUtil;
+    private ScalingService scalingService;
 
     @Value("${queue.modeling.modeling-call}")
     private String queueModelingCall;
@@ -42,7 +42,7 @@ public class ScheduleJob {
             log.info("每5分钟查询一次排队队列,mqNum:" + mqNum);
             if(mqNum - Integer.parseInt(baseNum) > 0){
                 log.info("使用弹性升缩开启一台ECS");
-                log.info(rubberSheetingUtil.createEcs());
+                log.info(scalingService.createEcs());
             }
         } catch (Exception e) {
             e.printStackTrace();