提交 50919b0a 编写于 作者: C chris-sun-star

add sleep in for loop

上级 cb9075aa
...@@ -16,6 +16,7 @@ import ( ...@@ -16,6 +16,7 @@ import (
"context" "context"
"net/http" "net/http"
"sync" "sync"
"time"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/pkg/errors" "github.com/pkg/errors"
...@@ -93,6 +94,7 @@ func (server *MonitorAgentServer) Run() error { ...@@ -93,6 +94,7 @@ func (server *MonitorAgentServer) Run() error {
if !(adminServerOk && serverOk) { if !(adminServerOk && serverOk) {
return errors.New("start monagent server failed, adminSer") return errors.New("start monagent server failed, adminSer")
} }
time.Sleep(time.Second * 10)
} }
return nil return nil
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册