[ Cmii ] [ Octopus ] - hot fix manual shut down init queue
This commit is contained in:
@@ -294,8 +294,8 @@ func handleInitMsgFromServer(initFromServerMsg *rabbitmq.OctopusMessage, initToS
|
||||
// shutdownRegisterQueueConnection 关闭初始化连接的两个队列
|
||||
func shutdownRegisterQueueConnection(initFromServerQueue *rabbitmq.RabbitQueue, initToServerQueue *rabbitmq.RabbitQueue) {
|
||||
|
||||
_ = initFromServerQueue.Close()
|
||||
_ = initToServerQueue.Close()
|
||||
initFromServerQueue.ConsumeOK = false
|
||||
initToServerQueue.ConsumeOK = false
|
||||
|
||||
log.InfoF("Octopus Agent Init Queue has disconnected!")
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ type RabbitQueue struct {
|
||||
RabbitConnectInfo *RabbitTCPConnectInfo
|
||||
// 返回消息队列
|
||||
ReceiveChan *RabbitReceiveChan
|
||||
// Consume 是否继续
|
||||
ConsumeOK bool
|
||||
}
|
||||
|
||||
// RabbitMQConn is a struct that holds the connection and channel objects
|
||||
@@ -192,6 +194,7 @@ func (r *RabbitQueue) Close() error {
|
||||
func (r *RabbitQueue) Handle() chan bool {
|
||||
|
||||
deliveries := r.Read(true)
|
||||
|
||||
foreverHandle := make(chan bool)
|
||||
// 死循环,处理Octopus Message
|
||||
P.Submit(func() {
|
||||
@@ -208,6 +211,13 @@ func (r *RabbitQueue) Handle() chan bool {
|
||||
P.Submit(func() {
|
||||
om.HandleMsg(r.ReceiveChan)
|
||||
})
|
||||
|
||||
// 2024年4月9日
|
||||
if !r.ConsumeOK {
|
||||
marshal, _ := json.Marshal(r.RabbitProp)
|
||||
log.InfoF("Rabbit Queue of %s disconnect!", marshal)
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
return foreverHandle
|
||||
|
||||
1
agent-go/shell/octopus-update.sh
Normal file
1
agent-go/shell/octopus-update.sh
Normal file
@@ -0,0 +1 @@
|
||||
#!/bin/bash
|
||||
@@ -42,15 +42,16 @@ public class TestImageSyncScheduler {
|
||||
));
|
||||
|
||||
ArrayList<String> ImageFullNameList = new ArrayList<>(List.of(
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-live-operator:5.2.0",
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-srs-oss-adaptor:2023-SA"
|
||||
// "harbor.cdcyy.com.cn/cmii/cmii-live-operator:5.2.0",
|
||||
// "harbor.cdcyy.com.cn/cmii/cmii-srs-oss-adaptor:2023-SA"
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-uav-process:5.4.0-040901"
|
||||
));
|
||||
|
||||
Boolean downloadAndCompressOnly = false;
|
||||
|
||||
// String projectNamespace = "wdd"; // wdd
|
||||
// String projectNamespace = "cqlyj"; // cqlyj
|
||||
String projectNamespace = "jlyd"; // jlyd
|
||||
String projectNamespace = "cqlyj"; // cqlyj
|
||||
// String projectNamespace = "jlyd"; // jlyd
|
||||
|
||||
// String innerWorkerAgentName = "Chengdu-amd64-65-lapwdd"; //wdd
|
||||
String innerWorkerAgentName = "Chengdu-amd64-71-3571gd"; //prod
|
||||
|
||||
Reference in New Issue
Block a user