IP名单中IP创建时保存相关节点、服务、WAF策略信息

This commit is contained in:
刘祥超
2021-11-16 16:11:05 +08:00
parent 6d002e2822
commit 6a0547abec
13 changed files with 62 additions and 50 deletions

View File

@@ -131,6 +131,7 @@ func (this *Node) Start() {
remotelogs.Error("NODE", "start failed: read node config failed: "+err.Error())
return
}
teaconst.NodeId = nodeConfig.Id
err = nodeConfig.Init()
if err != nil {
remotelogs.Error("NODE", "init node config failed: "+err.Error())
@@ -363,6 +364,7 @@ func (this *Node) syncConfig(taskVersion int64) error {
if err != nil {
return errors.New("decode config failed: " + err.Error())
}
teaconst.NodeId = nodeConfig.Id
// 写入到文件中
err = nodeConfig.Save()