mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
e8fe3a77b3
commit
c5f4d3c780
19 changed files with 86 additions and 28 deletions
|
@ -98,7 +98,6 @@ func newTask(action string, handler interface{}, args ...interface{}) *Task {
|
|||
}
|
||||
|
||||
const (
|
||||
CloudSync = "task.cloud.sync" // 数据同步
|
||||
RepoCheckout = "task.repo.checkout" // 从快照中检出
|
||||
DatabaseIndexFull = "task.database.index.full" // 重建索引
|
||||
DatabaseIndex = "task.database.index" // 数据库索引队列
|
||||
|
@ -120,8 +119,15 @@ func StatusLoop() {
|
|||
continue
|
||||
}
|
||||
|
||||
actionLangs := util.TaskActionLangs[util.Lang]
|
||||
action := task.Action
|
||||
if nil != actionLangs {
|
||||
if label := actionLangs[task.Action]; nil != label {
|
||||
action = label.(string)
|
||||
}
|
||||
}
|
||||
item := map[string]interface{}{
|
||||
"action": task.Action,
|
||||
"action": action,
|
||||
}
|
||||
items = append(items, item)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue