|
@@ -3,6 +3,7 @@ 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.fyun.config.FYunFileConfig;
|
|
|
import com.taobao.api.ApiException;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -32,11 +33,14 @@ public class BuildSceneDTServiceImpl implements IBuildSceneDTService {
|
|
|
"**num**: %s\n\n" +
|
|
|
"**server-path**: %s\n\n";
|
|
|
|
|
|
- public static final String contentExt = "**algorithm-log**: [https://4dkk.4dage.com/build_log/%s/console.log](https://4dkk.4dage.com/build_log/%s/console.log)";
|
|
|
+ public static final String contentExt = "**algorithm-log**: [%sbuild_log/%s/console.log](%sbuild_log/%s/console.log)";
|
|
|
|
|
|
@Autowired
|
|
|
private DingTalkSendUtils dingTalkSendUtils;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private FYunFileConfig fYunFileConfig;
|
|
|
+
|
|
|
@Value("${main.url}")
|
|
|
private String mainUrl;
|
|
|
|
|
@@ -44,7 +48,10 @@ public class BuildSceneDTServiceImpl implements IBuildSceneDTService {
|
|
|
public void handModelFail(String reason, String serverPath, String num, String hostName) {
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
try {
|
|
|
- String content = String.format(this.DINGTALK_MSG_PATTERN + contentExt, this.mainUrl, hostName, reason, num, serverPath, num, num);
|
|
|
+ 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) {
|