边缘节点没有集群的时候视为删除

This commit is contained in:
GoEdgeLab
2021-08-07 10:12:17 +08:00
parent 9d4a3bb7c0
commit bbfa04fa7f

View File

@@ -1238,6 +1238,11 @@ func (this *NodeDAO) DeleteNodeFromCluster(tx *dbs.Tx, nodeId int64, clusterId i
op.Id = nodeId
op.ClusterId = newClusterId
op.SecondaryClusterIds = secondaryClusterIdsJSON
if newClusterId == 0 {
op.State = NodeStateDisabled
}
return this.Save(tx, op)
}