5秒盾策略变化时只更新策略配置

This commit is contained in:
GoEdgeLab
2023-04-03 16:11:48 +08:00
parent 3a3854d443
commit 46a789870c
3 changed files with 44 additions and 2 deletions

View File

@@ -1077,7 +1077,7 @@ func (this *NodeClusterDAO) UpdateClusterUAMPolicy(tx *dbs.Tx, clusterId int64,
return err
}
return this.NotifyUpdate(tx, clusterId)
return this.NotifyUAMUpdate(tx, clusterId)
}
uamPolicyJSON, err := json.Marshal(uamPolicy)
@@ -1092,7 +1092,7 @@ func (this *NodeClusterDAO) UpdateClusterUAMPolicy(tx *dbs.Tx, clusterId int64,
return err
}
return this.NotifyUpdate(tx, clusterId)
return this.NotifyUAMUpdate(tx, clusterId)
}
// FindClusterUAMPolicy 查询设置
@@ -1212,6 +1212,11 @@ func (this *NodeClusterDAO) NotifyUpdate(tx *dbs.Tx, clusterId int64) error {
return SharedNodeTaskDAO.CreateClusterTask(tx, nodeconfigs.NodeRoleNode, clusterId, 0, 0, NodeTaskTypeConfigChanged)
}
// NotifyUAMUpdate 通知UAM更新
func (this *NodeClusterDAO) NotifyUAMUpdate(tx *dbs.Tx, clusterId int64) error {
return SharedNodeTaskDAO.CreateClusterTask(tx, nodeconfigs.NodeRoleNode, clusterId, 0, 0, NodeTaskTypeUAMPolicyChanged)
}
// NotifyDNSUpdate 通知DNS更新
// TODO 更新新的DNS解析记录的同时需要删除老的DNS解析记录
func (this *NodeClusterDAO) NotifyDNSUpdate(tx *dbs.Tx, clusterId int64) error {