mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
2ac8151c7a
commit
6141be700a
3 changed files with 31 additions and 20 deletions
|
|
@ -339,22 +339,6 @@ func (box *Box) Remove(path string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (box *Box) Unindex() {
|
||||
task.PrependTask(task.DatabaseIndex, unindex, box.ID)
|
||||
}
|
||||
|
||||
func unindex(boxID string) {
|
||||
tx, err := sql.BeginTx()
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
sql.RemoveBoxHash(tx, boxID)
|
||||
sql.DeleteByBoxTx(tx, boxID)
|
||||
sql.CommitTx(tx)
|
||||
ids := treenode.RemoveBlockTreesByBoxID(boxID)
|
||||
RemoveRecentDoc(ids)
|
||||
}
|
||||
|
||||
func (box *Box) ListFiles(path string) (ret []*FileInfo) {
|
||||
fis, _, err := box.Ls(path)
|
||||
if nil != err {
|
||||
|
|
@ -512,7 +496,7 @@ func fullReindex() {
|
|||
|
||||
openedBoxes := Conf.GetOpenedBoxes()
|
||||
for _, openedBox := range openedBoxes {
|
||||
openedBox.Index(true)
|
||||
index(openedBox.ID, true)
|
||||
}
|
||||
IndexRefs()
|
||||
treenode.SaveBlockTree(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue