mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-15 00:40:26 +08:00
删除集群的时候同时删除相关节点运行日志
This commit is contained in:
@@ -55,12 +55,16 @@ func (this *NodeClusterDAO) EnableNodeCluster(tx *dbs.Tx, id int64) error {
|
||||
}
|
||||
|
||||
// DisableNodeCluster 禁用条目
|
||||
func (this *NodeClusterDAO) DisableNodeCluster(tx *dbs.Tx, id int64) error {
|
||||
func (this *NodeClusterDAO) DisableNodeCluster(tx *dbs.Tx, clusterId int64) error {
|
||||
_, err := this.Query(tx).
|
||||
Pk(id).
|
||||
Pk(clusterId).
|
||||
Set("state", NodeClusterStateDisabled).
|
||||
Update()
|
||||
return err
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return SharedNodeLogDAO.DeleteNodeLogsWithCluster(tx, nodeconfigs.NodeRoleNode, clusterId)
|
||||
}
|
||||
|
||||
// FindEnabledNodeCluster 查找集群
|
||||
|
||||
Reference in New Issue
Block a user