🎨 Update av

This commit is contained in:
Daniel 2023-06-30 15:42:17 +08:00
parent d96f09d2d4
commit be1b34a163
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 12 additions and 11 deletions

View file

@ -200,17 +200,17 @@ func execOp(op *dbQueueOperation, tx *sql.Tx, context map[string]interface{}) (e
}
func RebuildAttributeViewQueue(av *av.AttributeView) {
dbQueueLock.Lock()
defer dbQueueLock.Unlock()
newOp := &dbQueueOperation{av: av, inQueueTime: time.Now(), action: "av_rebuild"}
for i, op := range operationQueue {
if "av_rebuild" == op.action && op.av.ID == av.ID {
operationQueue[i] = newOp
return
}
}
operationQueue = append(operationQueue, newOp)
//dbQueueLock.Lock()
//defer dbQueueLock.Unlock()
//
//newOp := &dbQueueOperation{av: av, inQueueTime: time.Now(), action: "av_rebuild"}
//for i, op := range operationQueue {
// if "av_rebuild" == op.action && op.av.ID == av.ID {
// operationQueue[i] = newOp
// return
// }
//}
//operationQueue = append(operationQueue, newOp)
}
func BatchRemoveAssetsQueue(hashes []string) {