mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-27 07:26:36 +08:00
删除节点的时候同时也删除相关的运行日志
This commit is contained in:
@@ -360,3 +360,12 @@ func (this *NodeLogDAO) UpdateAllNodeLogsRead(tx *dbs.Tx) error {
|
||||
Set("isRead", true).
|
||||
UpdateQuickly()
|
||||
}
|
||||
|
||||
// DeleteNodeLogs 删除某个节点上的日志
|
||||
func (this *NodeLogDAO) DeleteNodeLogs(tx *dbs.Tx, role nodeconfigs.NodeRole, nodeId int64) error {
|
||||
_, err := this.Query(tx).
|
||||
Attr("nodeId", nodeId).
|
||||
Attr("role", role).
|
||||
Delete()
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user