♻️ 改进后台任务判断重复
This commit is contained in:
parent
4f717a81cb
commit
7d7a198982
2 changed files with 2 additions and 2 deletions
|
@ -157,7 +157,7 @@ func loadTreeByBlockID(id string) (ret *parse.Tree, err error) {
|
|||
|
||||
bt := treenode.GetBlockTree(id)
|
||||
if nil == bt {
|
||||
if task.ContainIndexTask(task.DatabaseIndex, task.DatabaseIndexFull) {
|
||||
if task.Contain(task.DatabaseIndex, task.DatabaseIndexFull) {
|
||||
err = ErrIndexing
|
||||
return
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ const (
|
|||
ReloadUI = "task.reload.ui" // 重载 UI
|
||||
)
|
||||
|
||||
func ContainIndexTask(action string, moreActions ...string) bool {
|
||||
func Contain(action string, moreActions ...string) bool {
|
||||
actions := append(moreActions, action)
|
||||
actions = gulu.Str.RemoveDuplicatedElem(actions)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue