mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-30 18:00:56 +01:00
加入hostname注册
This commit is contained in:
@@ -23,6 +23,7 @@ type Data struct {
|
||||
Key string `json:"key"`
|
||||
Mac string `json:"mac"`
|
||||
Ip string `json:"ip"`
|
||||
Hostname string `json:"hostname"`
|
||||
Master bool `json:"master"`
|
||||
UpdateTs time.Time `json:"update_ts"`
|
||||
UpdateTsUnix int64 `json:"update_ts_unix"`
|
||||
@@ -182,6 +183,7 @@ func UpdateNodeData() {
|
||||
Key: key,
|
||||
Mac: mac,
|
||||
Ip: ip,
|
||||
Hostname: hostname,
|
||||
Master: model.IsMaster(),
|
||||
UpdateTs: time.Now(),
|
||||
UpdateTsUnix: time.Now().Unix(),
|
||||
@@ -199,7 +201,6 @@ func UpdateNodeData() {
|
||||
log.Errorf(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func MasterNodeCallback(message redis.Message) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user