mirror of https://bitbucket.org/ausocean/av.git
Update NetSender config if reconfig is needed.
This commit is contained in:
parent
463e983b21
commit
3ce4fae82b
|
@ -299,11 +299,12 @@ func periodicNetsenderReport() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//inputs := []string{"X20", "X21"}
|
|
||||||
inputs := netsender.SplitCSV(netsender.GetConfigParam("inputs"))
|
inputs := netsender.SplitCSV(netsender.GetConfigParam("inputs"))
|
||||||
if _, _, err := netsender.Send(netsender.RequestPoll, inputs); err != nil {
|
if _, reconfig, err := netsender.Send(netsender.RequestPoll, inputs); err == nil && reconfig {
|
||||||
|
if err = netsender.GetConfig(); err != nil {
|
||||||
config.Logger.Log("Error", err.Error())
|
config.Logger.Log("Error", err.Error())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if cloudVarSum := netsender.GetVarSum(); cloudVarSum != varSum {
|
if cloudVarSum := netsender.GetVarSum(); cloudVarSum != varSum {
|
||||||
if newVars, err := netsender.GetVars(); err != nil {
|
if newVars, err := netsender.GetVars(); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue