[ Cmii ] [ Octopus ] - reformat agent-go - 2
This commit is contained in:
@@ -22,8 +22,6 @@ var P = g.G.P
|
||||
|
||||
var log = logger.Log
|
||||
|
||||
//var AgentServerInfoCache = ®ister.AgentServerInfo{}
|
||||
|
||||
func INIT(octopusAgentConfigFileName string, agentServerInfoConf string) chan bool {
|
||||
|
||||
// 获取系统的环境变量
|
||||
@@ -153,6 +151,9 @@ func buildAndStartBusinessRuntimeQueue(agentTopicName string) chan bool {
|
||||
// 开始处理Runtime的OM消息
|
||||
businessForeverChan := octopusMsgQueue.Handle()
|
||||
|
||||
// cache it
|
||||
rabbitmq.BusinessRuntimeQueue = octopusMsgQueue
|
||||
|
||||
return businessForeverChan
|
||||
}
|
||||
|
||||
@@ -160,11 +161,20 @@ func buildAndStartBusinessRuntimeQueue(agentTopicName string) chan bool {
|
||||
func activatedOctopusAgentModules() {
|
||||
|
||||
// Agent
|
||||
a_agent.Activate()
|
||||
err := P.Submit(func() {
|
||||
a_agent.Activate()
|
||||
})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
// Executor
|
||||
a_executor.Activate()
|
||||
_ = P.Submit(func() {
|
||||
a_executor.Activate()
|
||||
})
|
||||
// Status
|
||||
a_status.Activate()
|
||||
_ = P.Submit(func() {
|
||||
a_status.Activate()
|
||||
})
|
||||
}
|
||||
|
||||
func buildAndSendInitMsgToServer(agentServerInfo *a_agent.AgentServerInfo, initToServerQueue *rabbitmq.RabbitQueue) {
|
||||
|
||||
Reference in New Issue
Block a user