mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-15 11:38:06 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
07ad00ec95
commit
a4d779258c
3 changed files with 24 additions and 7 deletions
|
|
@ -393,11 +393,10 @@ func getBlock(id string) (ret *Block, err error) {
|
|||
|
||||
tree, err := loadTreeByBlockID(id)
|
||||
if nil != err {
|
||||
waitForIndexing()
|
||||
tree, err = loadTreeByBlockID(id)
|
||||
if nil != err {
|
||||
return
|
||||
if indexing {
|
||||
err = ErrIndexing
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
node := treenode.GetNodeInTree(tree, id)
|
||||
|
|
|
|||
|
|
@ -138,9 +138,12 @@ func loadTree(localPath string, luteEngine *lute.Lute) (ret *parse.Tree, err err
|
|||
return
|
||||
}
|
||||
|
||||
var ErrBoxNotFound = errors.New("notebook not found")
|
||||
var ErrBlockNotFound = errors.New("block not found")
|
||||
var ErrTreeNotFound = errors.New("tree not found")
|
||||
var (
|
||||
ErrBoxNotFound = errors.New("notebook not found")
|
||||
ErrBlockNotFound = errors.New("block not found")
|
||||
ErrTreeNotFound = errors.New("tree not found")
|
||||
ErrIndexing = errors.New("indexing")
|
||||
)
|
||||
|
||||
func loadTreeByBlockID(id string) (ret *parse.Tree, err error) {
|
||||
if "" == id {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue