Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Update av

Danielbe1b34a163c2
diff --git a/kernel/api/transaction.go b/kernel/api/transaction.go
index 74c3f899fb..2d4b84b984 100644
--- a/kernel/api/transaction.go
+++ b/kernel/api/transaction.go
@@ -78,6 +78,7 @@ func performTransactions(c *gin.Context) {
func pushTransactions(app, session string, transactions []*model.Transaction) {
pushMode := util.PushModeBroadcastExcludeSelf
if 0 < len(transactions) && 0 < len(transactions[0].DoOperations) {
+ model.WaitForWritingFiles()
if strings.Contains(strings.ToLower(transactions[0].DoOperations[0].Action), "attrview") {
pushMode = util.PushModeBroadcast
}
diff --git a/kernel/sql/queue.go b/kernel/sql/queue.go
index 259bc96cc9..f3abc46021 100644
--- a/kernel/sql/queue.go
+++ b/kernel/sql/queue.go
@@ -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) {