Skip to content

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

:art: Clean code

Daniel6a3c28063953
diff --git a/kernel/sql/queue.go b/kernel/sql/queue.go
index 460e884266..5cc0787018 100644
--- a/kernel/sql/queue.go
+++ b/kernel/sql/queue.go
@@ -36,7 +36,6 @@ var (
operationQueue []*dbQueueOperation
dbQueueLock = sync.Mutex{}
txLock = sync.Mutex{}
- isWriting = false
)
type dbQueueOperation struct {
@@ -72,11 +71,7 @@ func FlushQueue() {
}
txLock.Lock()
- isWriting = true
- defer func() {
- isWriting = false
- txLock.Unlock()
- }()
+ defer txLock.Unlock()
start := time.Now()