Skip to content

Commit

Permalink
Merge branch 'DataLinkDC:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoyan1998 authored Apr 18, 2024
2 parents 956e5f8 + 7b08828 commit 5b9822e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,6 @@ public void registerProcess(ProcessType type, String processName) throws Runtime
*/
public ProcessStepEntity registerProcessStep(ProcessStepType type, String processName, String parentStepPid)
throws RuntimeException {
if (!logPross.containsKey(processName)) {
throw new BusException(StrFormatter.format("Process {} does not exist", type));
}
ProcessEntity process = logPross.get(processName);
process.setStatus(ProcessStatus.RUNNING);
ProcessStepEntity processStepEntity = ProcessStepEntity.builder()
.key(UUID.fastUUID().toString())
.status(ProcessStatus.RUNNING)
Expand All @@ -180,6 +175,12 @@ public ProcessStepEntity registerProcessStep(ProcessStepType type, String proces
.children(new CopyOnWriteArrayList<>())
.build();

if (!logPross.containsKey(processName)) {
log.error(StrFormatter.format("Process {} does not exist", type));
return processStepEntity;
}
ProcessEntity process = logPross.get(processName);
process.setStatus(ProcessStatus.RUNNING);
if (TextUtils.isEmpty(parentStepPid)) {
// parentStep为空表示为顶级节点
process.getChildren().add(processStepEntity);
Expand All @@ -202,10 +203,10 @@ public ProcessStepEntity registerProcessStep(ProcessStepType type, String proces
* @param e exception object, optional
*/
public void finishedProcess(String processName, ProcessStatus status, Throwable e) {
if (!logPross.containsKey(processName)) {
ProcessEntity process = logPross.remove(processName);
if (process == null) {
return;
}
ProcessEntity process = logPross.get(processName);
process.setStatus(status);
process.setEndTime(LocalDateTime.now());
process.setTime(
Expand All @@ -219,7 +220,6 @@ public void finishedProcess(String processName, ProcessStatus status, Throwable
}
FileUtil.writeUtf8String(JSONObject.toJSONString(process), filePath);
appendLog(processName, null, StrFormatter.format("Process {} exit with status:{}", processName, status), true);
logPross.remove(processName);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

import com.fasterxml.jackson.databind.node.ObjectNode;

import cn.dev33.satoken.annotation.SaCheckLogin;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
Expand All @@ -63,7 +62,6 @@
@Api(tags = "OpenAPI & Task API Controller")
@RequestMapping("/openapi")
@RequiredArgsConstructor
@SaCheckLogin
public class APIController {

private final TaskService taskService;
Expand Down
25 changes: 13 additions & 12 deletions docs/docs/user_guide/register_center/alert/alert_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,19 @@ title: 告警实例

### 邮箱

| 字段 | 说明 | 是否必填 | 默认值 | 示例 |
|:---------:|:--------------------------:|:----:|:-----:|:--:|
| 邮箱地址 | 邮箱地址 ||||
| 邮件服务器Port | 邮件服务器端口 ||||
| 发送者昵称 | 发送者昵称 ||||
| 收件人邮箱 | 收件人邮箱 ||||
| 抄送人邮箱 | 抄送人邮箱 ||||
| 是否开启邮箱验证 | 是否开启邮箱验证 || false ||
| 邮箱用户名 | 邮箱用户名 ||||
| 邮箱密码 | 邮箱密码 ,注意:部分邮箱需要自行获取授权码而非密码 ||||
| 开启tls证书 | 开启tls证书 || false ||
| 开启SSL | 开启SSL证书 || false ||
| 字段 | 说明 | 是否必填 | 默认值 | 示例 |
|:---------:|:-----------------------------:|:----:|:-----:|:------------:|
| 邮箱地址 | 邮箱地址 ||||
| 邮件服务器Port | 邮件服务器端口 ||||
| 发送者昵称 | 发送者昵称 ||||
| 收件人邮箱 | 收件人邮箱 ||||
| 抄送人邮箱 | 抄送人邮箱 ||||
| 是否开启邮箱验证 | 是否开启邮箱验证 || false ||
| 邮箱用户名 | 邮箱用户名 ||||
| 邮箱密码 | 邮箱密码 ,注意:部分邮箱需要自行获取授权码而非密码 ||||
| 开启tls证书 | 开启tls证书 || false ||
| 开启SSL | 开启SSL证书 || false ||
| 受信任域 | 如果开启了SSL,必填(一半情况和邮箱服务器保持一致即可) ||| stmp.126.com |

### 短信

Expand Down

0 comments on commit 5b9822e

Please sign in to comment.