mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-13 02:34:20 +01:00
🎨 后台任务按任务加入先后顺序去重执行 Fix https://github.com/siyuan-note/siyuan/issues/7270
This commit is contained in:
parent
9f491713ad
commit
8a7df8af78
6 changed files with 40 additions and 22 deletions
|
|
@ -505,7 +505,7 @@ func ReloadUI() {
|
|||
}
|
||||
|
||||
func FullReindex() {
|
||||
task.PrependTask(task.DatabaseIndexFull, fullReindex)
|
||||
task.AppendTask(task.DatabaseIndexFull, fullReindex)
|
||||
task.AppendTask(task.DatabaseCache, sql.EnableCache)
|
||||
task.AppendTask(task.DatabaseIndexRef, IndexRefs)
|
||||
task.AppendTask(task.ReloadUI, util.ReloadUI)
|
||||
|
|
|
|||
|
|
@ -1256,7 +1256,7 @@ func removeDoc(box *Box, p string) {
|
|||
}
|
||||
util.PushEvent(evt)
|
||||
|
||||
task.PrependTask(task.DatabaseIndex, removeDoc0, box, p, childrenDir)
|
||||
task.AppendTask(task.DatabaseIndex, removeDoc0, box, p, childrenDir)
|
||||
}
|
||||
|
||||
func removeDoc0(box *Box, p, childrenDir string) {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ func AutoGenerateDocHistory() {
|
|||
ChangeHistoryTick(Conf.Editor.GenerateHistoryInterval)
|
||||
for {
|
||||
<-historyTicker.C
|
||||
task.PrependTask(task.HistoryGenerateDoc, generateDocHistory)
|
||||
task.AppendTask(task.HistoryGenerateDoc, generateDocHistory)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import (
|
|||
)
|
||||
|
||||
func (box *Box) Unindex() {
|
||||
task.PrependTask(task.DatabaseIndex, unindex, box.ID)
|
||||
task.AppendTask(task.DatabaseIndex, unindex, box.ID)
|
||||
}
|
||||
|
||||
func unindex(boxID string) {
|
||||
|
|
@ -49,7 +49,7 @@ func unindex(boxID string) {
|
|||
}
|
||||
|
||||
func (box *Box) Index() {
|
||||
task.PrependTask(task.DatabaseIndex, index, box.ID)
|
||||
task.AppendTask(task.DatabaseIndex, index, box.ID)
|
||||
task.AppendTask(task.DatabaseIndexRef, IndexRefs)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -504,7 +504,7 @@ func InitRepoKey() (err error) {
|
|||
}
|
||||
|
||||
func CheckoutRepo(id string) {
|
||||
task.PrependTask(task.RepoCheckout, checkoutRepo, id)
|
||||
task.AppendTask(task.RepoCheckout, checkoutRepo, id)
|
||||
}
|
||||
|
||||
func checkoutRepo(id string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue