🎨 清理块树中重复冗余的数据

This commit is contained in:
Liang Ding 2023-02-01 15:22:09 +08:00
parent de79543300
commit c0240f20d6
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 127 additions and 92 deletions

View file

@ -181,6 +181,10 @@ func execOp(op *dbQueueOperation, tx *sql.Tx, context map[string]interface{}) (e
}
func BatchRemoveAssetsQueue(hashes []string) {
if 1 > len(hashes) {
return
}
dbQueueLock.Lock()
defer dbQueueLock.Unlock()
@ -319,6 +323,10 @@ func RemoveTreeQueue(box, rootID string) {
}
func BatchRemoveTreeQueue(rootIDs []string) {
if 1 > len(rootIDs) {
return
}
dbQueueLock.Lock()
defer dbQueueLock.Unlock()