|
@@ -2,9 +2,9 @@ package com.fdkankan.contro.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.fdkankan.contro.service.IBuildSceneDTService;
|
|
|
-import com.fdkankan.dingtalk.DingTalkSendUtils;
|
|
|
+//import com.fdkankan.dingtalk.DingTalkSendUtils;
|
|
|
import com.fdkankan.fyun.config.FYunFileConfig;
|
|
|
-import com.taobao.api.ApiException;
|
|
|
+//import com.taobao.api.ApiException;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -35,8 +35,8 @@ public class BuildSceneDTServiceImpl implements IBuildSceneDTService {
|
|
|
|
|
|
public static final String contentExt = "**algorithm-log**: [%sbuild_log/%s/console.log](%sbuild_log/%s/console.log)";
|
|
|
|
|
|
- @Autowired
|
|
|
- private DingTalkSendUtils dingTalkSendUtils;
|
|
|
+// @Autowired
|
|
|
+// private DingTalkSendUtils dingTalkSendUtils;
|
|
|
|
|
|
@Autowired
|
|
|
private FYunFileConfig fYunFileConfig;
|
|
@@ -46,30 +46,30 @@ public class BuildSceneDTServiceImpl implements IBuildSceneDTService {
|
|
|
|
|
|
@Override
|
|
|
public void handModelFail(String reason, String serverPath, String num, String hostName) {
|
|
|
- CompletableFuture.runAsync(() -> {
|
|
|
- try {
|
|
|
- log.info("开始发送钉钉消息");
|
|
|
- String logPath = String.format(contentExt,fYunFileConfig.getHost(),num,fYunFileConfig.getHost(),num);
|
|
|
- log.info("发送钉钉消息,content:{}", logPath);
|
|
|
- String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath) + logPath;
|
|
|
- log.info("发送钉钉消息,content:{}", content);
|
|
|
- dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
|
|
|
- } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
|
|
|
- log.error("发送钉钉消息失败", apiException);
|
|
|
- }
|
|
|
- });
|
|
|
+// CompletableFuture.runAsync(() -> {
|
|
|
+// try {
|
|
|
+// log.info("开始发送钉钉消息");
|
|
|
+// String logPath = String.format(contentExt,fYunFileConfig.getHost(),num,fYunFileConfig.getHost(),num);
|
|
|
+// log.info("发送钉钉消息,content:{}", logPath);
|
|
|
+// String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath) + logPath;
|
|
|
+// log.info("发送钉钉消息,content:{}", content);
|
|
|
+// dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
|
|
|
+// } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
|
|
|
+// log.error("发送钉钉消息失败", apiException);
|
|
|
+// }
|
|
|
+// });
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void handBaseFail(String reason, String serverPath, String num, String hostName) {
|
|
|
- CompletableFuture.runAsync(() -> {
|
|
|
- try {
|
|
|
- String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath);
|
|
|
- log.info("发送钉钉消息,content:{}", content);
|
|
|
- dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
|
|
|
- } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
|
|
|
- log.error("发送钉钉消息失败", apiException);
|
|
|
- }
|
|
|
- });
|
|
|
+// CompletableFuture.runAsync(() -> {
|
|
|
+// try {
|
|
|
+// String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath);
|
|
|
+// log.info("发送钉钉消息,content:{}", content);
|
|
|
+// dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
|
|
|
+// } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
|
|
|
+// log.error("发送钉钉消息失败", apiException);
|
|
|
+// }
|
|
|
+// });
|
|
|
}
|
|
|
}
|