🎨 重建索引细节进度推送展现 https://github.com/siyuan-note/siyuan/issues/5890

This commit is contained in:
Liang Ding 2022-09-16 10:47:54 +08:00
parent fbe44a0aa0
commit 9a7f61f715
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
10 changed files with 103 additions and 27 deletions

View file

@ -98,12 +98,13 @@ func flushTreeQueue() {
return
}
context := map[string]interface{}{CtxPushMsg: CtxPushMsgToStatusBar}
boxes := hashset.New()
for _, op := range ops {
switch op.action {
case "upsert":
tree := op.upsertTree
if err = upsertTree(tx, tree); nil != err {
if err = upsertTree(tx, tree, context); nil != err {
logging.LogErrorf("upsert tree [%s] into database failed: %s", tree.Box+tree.Path, err)
}
boxes.Add(op.upsertTree.Box)