Skip to content

Commit

Permalink
Merge pull request #10727 from tangruotian/issue-10725
Browse files Browse the repository at this point in the history
装WINDOWS构建机,且点击install.bat完成安装,刷新节点没有显示 #10725
  • Loading branch information
irwinsun authored Jul 30, 2024
2 parents c12acc1 + 8464ea5 commit 4b3d87b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/agent/agent/src/pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,19 @@ func Run(isDebug bool) {
// 初始化国际化
i18n.InitAgentI18n()

// 启动 agent,需要等到上报启动成功才能继续
_, err := job.AgentStartup()
if err != nil {
logs.Warn("agent startup failed: ", err.Error())
logs.WithError(err).Error("agent startup failed")
for {
_, err = job.AgentStartup()
if err == nil {
break
} else {
logs.WithError(err).Error("agent startup failed")
time.Sleep(5 * time.Second)
}
}
}

// 数据采集
Expand Down

0 comments on commit 4b3d87b

Please sign in to comment.