mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
2d94fd2b76
commit
0da0fb6712
2 changed files with 4 additions and 2 deletions
|
|
@ -38,6 +38,7 @@ import (
|
||||||
"github.com/siyuan-note/siyuan/kernel/conf"
|
"github.com/siyuan-note/siyuan/kernel/conf"
|
||||||
"github.com/siyuan-note/siyuan/kernel/search"
|
"github.com/siyuan-note/siyuan/kernel/search"
|
||||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||||
|
"github.com/siyuan-note/siyuan/kernel/task"
|
||||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||||
"github.com/siyuan-note/siyuan/kernel/util"
|
"github.com/siyuan-note/siyuan/kernel/util"
|
||||||
)
|
)
|
||||||
|
|
@ -48,7 +49,7 @@ func AutoGenerateDocHistory() {
|
||||||
ChangeHistoryTick(Conf.Editor.GenerateHistoryInterval)
|
ChangeHistoryTick(Conf.Editor.GenerateHistoryInterval)
|
||||||
for {
|
for {
|
||||||
<-historyTicker.C
|
<-historyTicker.C
|
||||||
generateDocHistory()
|
task.PrependTask(task.HistoryGenerateDoc, generateDocHistory)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,8 @@ const (
|
||||||
DatabaseIndex = "task.database.index" // 数据库所以队列
|
DatabaseIndex = "task.database.index" // 数据库所以队列
|
||||||
DatabaseIndexFix = "task.database.index.fix" // 数据库索引订正
|
DatabaseIndexFix = "task.database.index.fix" // 数据库索引订正
|
||||||
OCRImage = "task.ocr.image" // 图片 OCR 提取文本
|
OCRImage = "task.ocr.image" // 图片 OCR 提取文本
|
||||||
DatabaseIndexEmbedBlock = "task.database.index.embedblock" // 数据库索引嵌入块
|
HistoryGenerateDoc = "task.history.generateDoc" // 生成文件历史
|
||||||
|
DatabaseIndexEmbedBlock = "task.database.index.embedBlock" // 数据库索引嵌入块
|
||||||
)
|
)
|
||||||
|
|
||||||
func Loop() {
|
func Loop() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue