Browse Source

:art: 前端用户界面引入后台任务列表 https://github.com/siyuan-note/siyuan/issues/7117

Liang Ding 2 years ago
parent
commit
a99ca6d62f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      kernel/task/queue.go

+ 4 - 0
kernel/task/queue.go

@@ -126,6 +126,10 @@ func StatusLoop() {
 			}
 			items = append(items, item)
 		}
+		if 1 > len(items) {
+			items = []map[string]interface{}{}
+		}
+		data["tasks"] = items
 		util.PushBackgroundTask(data)
 		if 0 < len(tasks) {
 			time.Sleep(1000 * time.Millisecond)