Skip to content

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

:art: Data sync supports the multi-kernel online perception https://github.com/siyuan-note/siyuan/issues/8518

Daniel18985de1e5ae
diff --git a/kernel/model/repository.go b/kernel/model/repository.go
index 9ea0670c9c..99e96e9fdf 100644
--- a/kernel/model/repository.go
+++ b/kernel/model/repository.go
@@ -50,7 +50,6 @@ import (
"github.com/siyuan-note/siyuan/kernel/cache"
"github.com/siyuan-note/siyuan/kernel/conf"
"github.com/siyuan-note/siyuan/kernel/filesys"
- "github.com/siyuan-note/siyuan/kernel/sql"
"github.com/siyuan-note/siyuan/kernel/task"
"github.com/siyuan-note/siyuan/kernel/treenode"
"github.com/siyuan-note/siyuan/kernel/util"
@@ -1299,14 +1298,12 @@ func processSyncMergeResult(exit, byHand bool, start time.Time, mergeResult *dej
upsertRootIDs, removeRootIDs := incReindex(upserts, removes)
elapsed := time.Since(start)
go func() {
- sql.WaitForWritingDatabase()
- util.WaitForUILoaded()
-
if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container {
// 移动端不推送差异详情
upsertRootIDs = []string{}
}
+ util.WaitForUILoaded()
util.BroadcastByType("main", "syncMergeResult", 0, "",
map[string]interface{}{"upsertRootIDs": upsertRootIDs, "removeRootIDs": removeRootIDs})