🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113

This commit is contained in:
Liang Ding 2023-01-23 18:44:19 +08:00
parent 72093f7e2e
commit a452015ded
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 5 additions and 25 deletions

View file

@ -393,7 +393,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
continue
}
treenode.IndexBlockTree(tree)
treenode.ReindexBlockTree(tree)
sql.UpsertTreeQueue(tree)
}

View file

@ -86,11 +86,13 @@ func index(boxID string) {
updated := util.TimeFromID(tree.Root.ID)
tree.Root.SetIALAttr("updated", updated)
docIAL["updated"] = updated
writeJSONQueue(tree)
if writeErr := filesys.WriteTree(tree); nil != writeErr {
logging.LogErrorf("write tree [%s] failed: %s", tree.Path, writeErr)
}
}
cache.PutDocIAL(file.path, docIAL)
treenode.IndexBlockTree(tree)
treenode.ReindexBlockTree(tree)
sql.UpsertTreeQueue(tree)
util.IncBootProgress(bootProgressPart, fmt.Sprintf(Conf.Language(92), util.ShortPathForBootingDisplay(tree.Path)))