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

This commit is contained in:
Liang Ding 2023-01-24 21:50:10 +08:00
parent e8fe3a77b3
commit c5f4d3c780
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
19 changed files with 86 additions and 28 deletions

View file

@ -32,7 +32,6 @@ import (
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/conf"
"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/util"
)
@ -92,12 +91,8 @@ func BootSyncData() {
}
func SyncData(boot, exit, byHand bool) {
if !checkSync(boot, exit, byHand) {
return
}
util.BroadcastByType("main", "syncing", 0, Conf.Language(81), nil)
task.PrependTask(task.CloudSync, syncData, boot, exit, byHand)
syncData(boot, exit, byHand)
}
func syncData(boot, exit, byHand bool) {