果园自动化易联云key更新
This commit is contained in:
@@ -238,9 +238,9 @@ func PollingRemotEvent(remoteURL string, waitSecond int, params map[string]inter
|
||||
"waitSecond": waitSecond,
|
||||
})
|
||||
for {
|
||||
globals.SugarLogger.Debugf("PollingRemotEvent")
|
||||
globals.SugarLogger.Debugf("PollingRemotEvent %s", remoteURL)
|
||||
response, err := http.Get(utils.GenerateGetURL(remoteURL, "", params2))
|
||||
globals.SugarLogger.Debugf("PollingRemotEvent2 error:%v", err)
|
||||
globals.SugarLogger.Debugf("PollingRemotEvent2 %s error:%v", remoteURL, err)
|
||||
if err == nil {
|
||||
defer response.Body.Close()
|
||||
if response.StatusCode == http.StatusOK {
|
||||
@@ -256,7 +256,7 @@ func PollingRemotEvent(remoteURL string, waitSecond int, params map[string]inter
|
||||
}
|
||||
}
|
||||
} else {
|
||||
err = fmt.Errorf("return code is:%s", result.Code)
|
||||
err = fmt.Errorf("PollingRemotEvent %s return code is:%s", remoteURL, result.Code)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -264,7 +264,7 @@ func PollingRemotEvent(remoteURL string, waitSecond int, params map[string]inter
|
||||
err = platformapi.ErrHTTPCodeIsNot200
|
||||
}
|
||||
}
|
||||
globals.SugarLogger.Infof("PollingRemotEvent failed with error:%v", err)
|
||||
globals.SugarLogger.Infof("PollingRemotEvent %s failed with error:%v", remoteURL, err)
|
||||
if err != nil {
|
||||
time.Sleep(errRefreshGap)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user