From 50919b0a3c10c08304c69edb48129353f8b3f25b Mon Sep 17 00:00:00 2001 From: chris-sun-star Date: Mon, 7 Feb 2022 10:57:55 +0800 Subject: [PATCH] add sleep in for loop --- engine/monagent_server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/monagent_server.go b/engine/monagent_server.go index b64b685..3d30488 100644 --- a/engine/monagent_server.go +++ b/engine/monagent_server.go @@ -16,6 +16,7 @@ import ( "context" "net/http" "sync" + "time" "github.com/gin-gonic/gin" "github.com/pkg/errors" @@ -93,6 +94,7 @@ func (server *MonitorAgentServer) Run() error { if !(adminServerOk && serverOk) { return errors.New("start monagent server failed, adminSer") } + time.Sleep(time.Second * 10) } return nil } -- GitLab