fix: offline state version
This commit is contained in:
@@ -154,7 +154,11 @@ func init() {
|
||||
return 0, errors.New("quota exceeded")
|
||||
})
|
||||
*/
|
||||
client.SetTimeout(time.Duration(2 * time.Second))
|
||||
client.
|
||||
SetTimeout(time.Duration(400 * time.Millisecond))
|
||||
// SetRetryCount(1).
|
||||
// SetRetryWaitTime(time.Duration(1 * time.Second)).
|
||||
// SetRetryMaxWaitTime(time.Duration(2 * time.Second))
|
||||
//client.SetTimeout(2 * time.Second)
|
||||
}
|
||||
|
||||
@@ -820,8 +824,9 @@ func GetStateFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
ErrorCode: "1", ErrorInfo: "Internal server error, NF connnect refused",
|
||||
}
|
||||
result["error"] = errorMessage
|
||||
SN, _ := dborm.XormGetNESN(ne.NeType, ne.NeId)
|
||||
SN, Version, _ := dborm.XormGetNEStateInfo(ne.NeType, ne.NeId)
|
||||
result["serialNum"] = SN
|
||||
result["verion"] = Version
|
||||
} else {
|
||||
systemState := make(map[string]interface{})
|
||||
_ = json.Unmarshal(resp.Body(), &systemState)
|
||||
|
||||
Reference in New Issue
Block a user