update target's cluster field when clustername modified in server.conf
This commit is contained in:
parent
c8e59cdd0c
commit
02dd70480d
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
|||
|
||||
NOW = $(shell date -u '+%Y%m%d%I%M%S')
|
||||
|
||||
RELEASE_VERSION = 5.7.0
|
||||
RELEASE_VERSION = 5.7.1
|
||||
|
||||
APP = n9e
|
||||
SERVER_BIN = $(APP)
|
||||
|
|
|
@ -36,7 +36,10 @@ func (t *Target) Add() error {
|
|||
return Insert(t)
|
||||
}
|
||||
|
||||
return nil
|
||||
return DB().Model(&Target{}).Where("ident = ?", t.Ident).Updates(map[string]interface{}{
|
||||
"cluster": t.Cluster,
|
||||
"update_at": t.UpdateAt,
|
||||
}).Error
|
||||
}
|
||||
|
||||
func (t *Target) FillGroup(cache map[int64]*BusiGroup) error {
|
||||
|
|
Loading…
Reference in New Issue