|
@@ -64,10 +64,15 @@ public class ModelingApplication implements CommandLineRunner {
|
|
if(fYunFileService.isPresent() && StrUtil.isNotEmpty(profiles)){
|
|
if(fYunFileService.isPresent() && StrUtil.isNotEmpty(profiles)){
|
|
//更新弹性伸缩jar包
|
|
//更新弹性伸缩jar包
|
|
boolean lock = redisLockUtil.lock("uploadModelingJar", 300);
|
|
boolean lock = redisLockUtil.lock("uploadModelingJar", 300);
|
|
- if(lock){
|
|
|
|
- String jarPath = System.getProperty("java.class.path");
|
|
|
|
- fYunFileService.get().uploadFile(jarPath, "elastic_model_jar/fdkk_" + profiles + "/" + FileUtil.getName(jarPath));
|
|
|
|
|
|
+ try {
|
|
|
|
+ if(lock){
|
|
|
|
+ String jarPath = System.getProperty("java.class.path");
|
|
|
|
+ fYunFileService.get().uploadFile(jarPath, "elastic_model_jar/fdkk_" + profiles + "/" + FileUtil.getName(jarPath));
|
|
|
|
+ }
|
|
|
|
+ }finally {
|
|
|
|
+ redisLockUtil.unlockLua("uploadModelingJar");
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|