[ Service ] [ Executor ] fix bugs

This commit is contained in:
zeaslity
2023-08-11 10:35:12 +08:00
parent d2c57f8d7b
commit 06170c1024
4 changed files with 24 additions and 20 deletions

View File

@@ -31,13 +31,13 @@ type OctopusMsgBuilder interface {
} }
type OctopusMessage struct { type OctopusMessage struct {
UUID string `json:"uuid"` UUID string `json:"uuid"`
InitTime string `json:"init_time" format:"2023-03-21 16:38:30"` InitTime string `json:"init_time" format:"2023-03-21 16:38:30"`
Type string `json:"type"` OctopusMessageType string `json:"octopusMessageType"`
Content interface{} `json:"content"` Content interface{} `json:"content"`
Result interface{} `json:"result"` ACTime string `json:"ac_time" format:"2023-03-21 16:38:30"`
ResultCode string `json:"resultCode"` Result interface{} `json:"result"`
ACTime string `json:"ac_time" format:"2023-03-21 16:38:30"` ResultCode string `json:"resultCode"`
} }
func (om *OctopusMessage) Handle() { func (om *OctopusMessage) Handle() {
@@ -75,18 +75,18 @@ func (om *OctopusMessage) Build(omType string, content interface{}) *OctopusMess
} }
return &OctopusMessage{ return &OctopusMessage{
UUID: curTimeString, UUID: curTimeString,
InitTime: curTimeString, InitTime: curTimeString,
Type: omType, OctopusMessageType: omType,
Content: string(bytes), Content: string(bytes),
Result: nil, Result: nil,
ACTime: curTimeString, ACTime: curTimeString,
} }
} }
func doHandleOctopusMessage(octopusMessage *OctopusMessage) { func doHandleOctopusMessage(octopusMessage *OctopusMessage) {
switch octopusMessage.Type { switch octopusMessage.OctopusMessageType {
case g.InitOmType: case g.InitOmType:
go func() {}() go func() {}()
case g.ExecOmType: case g.ExecOmType:

View File

@@ -10,7 +10,10 @@ public class ServerApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(ServerApplication.class, args); SpringApplication.run(
ServerApplication.class,
args
);
} }
} }

View File

@@ -16,6 +16,10 @@ import java.time.LocalDateTime;
@SuperBuilder(toBuilder = true) @SuperBuilder(toBuilder = true)
public class ServerInfoVO { public class ServerInfoVO {
/**
* 2023年8月11日 用于前端的展示的顺序
*/
private Integer id; private Integer id;
/** /**
@@ -63,11 +67,6 @@ public class ServerInfoVO {
@TableField(fill = FieldFill.INSERT_UPDATE) @TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime; private LocalDateTime updateTime;
/**
* 服务器节点的代理类型0代表INTERFACE, 1代表relay2代表external
*/
private Integer proxyType;
/** /**
* server location , type City Country * server location , type City Country
*/ */
@@ -149,4 +148,5 @@ public class ServerInfoVO {
private String agentVersion; private String agentVersion;
} }

View File

@@ -377,6 +377,7 @@ fi
agentServerInfoFile="/octopus-agent/octopus-agent.conf" agentServerInfoFile="/octopus-agent/octopus-agent.conf"
#cat >/etc/environment.d/octopus-agent.conf <<EOF #cat >/etc/environment.d/octopus-agent.conf <<EOF
touch $ageagentServerInfoFile
cat >"$agentServerInfoFile"<<EOF cat >"$agentServerInfoFile"<<EOF
serverName: ${city}-${hostArch}-${machineNumber} serverName: ${city}-${hostArch}-${machineNumber}
serverIpPbV4: $public_ipv4 serverIpPbV4: $public_ipv4