|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.job.job;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.fdkankan.rubbersheeting.ScalingService;
|
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
@@ -26,7 +27,15 @@ public class CreateScalingHandler {
|
|
|
public void createScalingHandler(){
|
|
|
XxlJobHelper.log("createScalingHandler start.....");
|
|
|
|
|
|
- scalingService.createEcs();
|
|
|
+ int count = 1;
|
|
|
+ String param = XxlJobHelper.getJobParam();
|
|
|
+ if(StrUtil.isNotEmpty(param)){
|
|
|
+ count = Integer.valueOf(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ for(int i = 0; i < count; i++){
|
|
|
+ scalingService.createEcs();
|
|
|
+ }
|
|
|
|
|
|
XxlJobHelper.log("createScalingHandler end.....");
|
|
|
}
|