From 06170c10242f06e0b02af395dd71bff73277d5b3 Mon Sep 17 00:00:00 2001 From: zeaslity Date: Fri, 11 Aug 2023 10:35:12 +0800 Subject: [PATCH] [ Service ] [ Executor ] fix bugs --- agent-go/rabbitmq/OctopusMessage.go | 28 +++++++++---------- .../main/java/io/wdd/ServerApplication.java | 5 +++- .../io/wdd/server/beans/vo/ServerInfoVO.java | 10 +++---- .../io/wdd/source/shell/lib/wdd-lib-env.sh | 1 + 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/agent-go/rabbitmq/OctopusMessage.go b/agent-go/rabbitmq/OctopusMessage.go index 10fe6af..614f4b9 100644 --- a/agent-go/rabbitmq/OctopusMessage.go +++ b/agent-go/rabbitmq/OctopusMessage.go @@ -31,13 +31,13 @@ type OctopusMsgBuilder interface { } type OctopusMessage struct { - UUID string `json:"uuid"` - InitTime string `json:"init_time" format:"2023-03-21 16:38:30"` - Type string `json:"type"` - Content interface{} `json:"content"` - Result interface{} `json:"result"` - ResultCode string `json:"resultCode"` - ACTime string `json:"ac_time" format:"2023-03-21 16:38:30"` + UUID string `json:"uuid"` + InitTime string `json:"init_time" format:"2023-03-21 16:38:30"` + OctopusMessageType string `json:"octopusMessageType"` + Content interface{} `json:"content"` + ACTime string `json:"ac_time" format:"2023-03-21 16:38:30"` + Result interface{} `json:"result"` + ResultCode string `json:"resultCode"` } func (om *OctopusMessage) Handle() { @@ -75,18 +75,18 @@ func (om *OctopusMessage) Build(omType string, content interface{}) *OctopusMess } return &OctopusMessage{ - UUID: curTimeString, - InitTime: curTimeString, - Type: omType, - Content: string(bytes), - Result: nil, - ACTime: curTimeString, + UUID: curTimeString, + InitTime: curTimeString, + OctopusMessageType: omType, + Content: string(bytes), + Result: nil, + ACTime: curTimeString, } } func doHandleOctopusMessage(octopusMessage *OctopusMessage) { - switch octopusMessage.Type { + switch octopusMessage.OctopusMessageType { case g.InitOmType: go func() {}() case g.ExecOmType: diff --git a/server/src/main/java/io/wdd/ServerApplication.java b/server/src/main/java/io/wdd/ServerApplication.java index 07d8464..60a7d5d 100644 --- a/server/src/main/java/io/wdd/ServerApplication.java +++ b/server/src/main/java/io/wdd/ServerApplication.java @@ -10,7 +10,10 @@ public class ServerApplication { public static void main(String[] args) { - SpringApplication.run(ServerApplication.class, args); + SpringApplication.run( + ServerApplication.class, + args + ); } } diff --git a/server/src/main/java/io/wdd/server/beans/vo/ServerInfoVO.java b/server/src/main/java/io/wdd/server/beans/vo/ServerInfoVO.java index fb83c80..bdeac38 100644 --- a/server/src/main/java/io/wdd/server/beans/vo/ServerInfoVO.java +++ b/server/src/main/java/io/wdd/server/beans/vo/ServerInfoVO.java @@ -16,6 +16,10 @@ import java.time.LocalDateTime; @SuperBuilder(toBuilder = true) public class ServerInfoVO { + + /** + * 2023年8月11日 用于前端的展示的顺序 + */ private Integer id; /** @@ -63,11 +67,6 @@ public class ServerInfoVO { @TableField(fill = FieldFill.INSERT_UPDATE) private LocalDateTime updateTime; - /** - * 服务器节点的代理类型,0代表INTERFACE, 1代表relay,2代表external - */ - private Integer proxyType; - /** * server location , type City Country */ @@ -149,4 +148,5 @@ public class ServerInfoVO { private String agentVersion; + } diff --git a/source/src/main/java/io/wdd/source/shell/lib/wdd-lib-env.sh b/source/src/main/java/io/wdd/source/shell/lib/wdd-lib-env.sh index aa592ec..edaff8f 100644 --- a/source/src/main/java/io/wdd/source/shell/lib/wdd-lib-env.sh +++ b/source/src/main/java/io/wdd/source/shell/lib/wdd-lib-env.sh @@ -377,6 +377,7 @@ fi agentServerInfoFile="/octopus-agent/octopus-agent.conf" #cat >/etc/environment.d/octopus-agent.conf <"$agentServerInfoFile"<