bugfix: update cluster when heartbeat
This commit is contained in:
parent
562f98ddaf
commit
e70622d18c
|
@ -87,8 +87,9 @@ func AlertingEngineHeartbeat(instance, cluster string) error {
|
||||||
Clock: time.Now().Unix(),
|
Clock: time.Now().Unix(),
|
||||||
}).Error
|
}).Error
|
||||||
} else {
|
} else {
|
||||||
// update
|
// updates
|
||||||
err = DB().Model(new(AlertingEngines)).Where("instance=?", instance).Update("clock", time.Now().Unix()).Error
|
fields := map[string]interface{}{"clock": time.Now().Unix(), "cluster": cluster}
|
||||||
|
err = DB().Model(new(AlertingEngines)).Where("instance=?", instance).Updates(fields).Error
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue