|
|
@@ -146,29 +146,12 @@ public class BuildSceneReceiver {
|
|
|
|
|
|
buildLog.setDuration((System.currentTimeMillis() - start) / 1000L);
|
|
|
this.afterBuild(buildStatus, buildLog);
|
|
|
- this.delNas(buildLog.getSceneNum());
|
|
|
SysConstants.SYSTEM_BUILDING = false;
|
|
|
this.redisUtil.del(new String[]{redisKey});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void delNas(String sceneNum) {
|
|
|
- log.info("开始删除nas计算资源:{}",sceneNum);
|
|
|
- try {
|
|
|
- ScenePro scenePro = this.sceneProService.findBySceneNum(sceneNum);
|
|
|
- if (scenePro != null && StringUtils.isNotBlank(scenePro.getDataSource())) {
|
|
|
- String dataSource = scenePro.getDataSource();
|
|
|
- this.uploadToOssUtil.uploadDirectory(dataSource, "build_result/" + sceneNum + "/");
|
|
|
- Thread.sleep(2000L);
|
|
|
- FileUtil.del(dataSource);
|
|
|
- this.sceneProService.updateDelBuildResult(scenePro.getId(), 1);
|
|
|
- }
|
|
|
- } catch (Exception var4) {
|
|
|
- log.info("del-build-result-error:{}", var4);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
private void preBuild(String content, BuildLog logRecord) throws Exception {
|
|
|
log.info("服务{} 开始处理队列{} 的消息:{}", SysConstants.hostName, this.queueNameService.getQueueName(), content);
|
|
|
@@ -536,7 +519,7 @@ public class BuildSceneReceiver {
|
|
|
this.sceneProService.updateStatus(buildLog.getSceneNum(), -1);
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
try {
|
|
|
- //DingDingUtils.sendMsgToDingRobot(reason, buildLog);
|
|
|
+ DingDingUtils.sendMsgToDingRobot(reason, buildLog);
|
|
|
} catch (Exception var3) {
|
|
|
log.info("发送钉钉计算失败消息失败:", var3);
|
|
|
}
|