mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 04:20:05 +08:00
🎨 Improve kernel stability https://github.com/siyuan-note/siyuan/issues/9912
This commit is contained in:
parent
c301a4ac0a
commit
339020a282
@ -432,6 +432,7 @@ func createDoc(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model.WaitForWritingFiles()
|
||||||
box := model.Conf.Box(notebook)
|
box := model.Conf.Box(notebook)
|
||||||
pushCreate(box, p, tree.Root.ID, arg)
|
pushCreate(box, p, tree.Root.ID, arg)
|
||||||
|
|
||||||
@ -461,8 +462,8 @@ func createDailyNote(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
box := model.Conf.Box(notebook)
|
|
||||||
model.WaitForWritingFiles()
|
model.WaitForWritingFiles()
|
||||||
|
box := model.Conf.Box(notebook)
|
||||||
luteEngine := util.NewLute()
|
luteEngine := util.NewLute()
|
||||||
tree, err := filesys.LoadTree(box.ID, p, luteEngine)
|
tree, err := filesys.LoadTree(box.ID, p, luteEngine)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
@ -549,6 +550,7 @@ func createDocWithMd(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
ret.Data = id
|
ret.Data = id
|
||||||
|
|
||||||
|
model.WaitForWritingFiles()
|
||||||
box := model.Conf.Box(notebook)
|
box := model.Conf.Box(notebook)
|
||||||
b, _ := model.GetBlock(id, nil)
|
b, _ := model.GetBlock(id, nil)
|
||||||
p := b.Path
|
p := b.Path
|
||||||
|
@ -1015,6 +1015,7 @@ func CreateDocByMd(boxID, p, title, md string, sorts []string) (tree *parse.Tree
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WaitForWritingFiles()
|
||||||
ChangeFileTreeSort(box.ID, sorts)
|
ChangeFileTreeSort(box.ID, sorts)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -1033,6 +1034,7 @@ func CreateWithMarkdown(boxID, hPath, md, parentID, id string) (retID string, er
|
|||||||
luteEngine := util.NewLute()
|
luteEngine := util.NewLute()
|
||||||
dom := luteEngine.Md2BlockDOM(md, false)
|
dom := luteEngine.Md2BlockDOM(md, false)
|
||||||
retID, err = createDocsByHPath(box.ID, hPath, dom, parentID, id)
|
retID, err = createDocsByHPath(box.ID, hPath, dom, parentID, id)
|
||||||
|
WaitForWritingFiles()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user