Переглянути джерело

!2 only show the last 5 tasks

pcacc 1 місяць тому
батько
коміт
4df8baccea
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      app_dongri.py

+ 2 - 1
app_dongri.py

@@ -136,7 +136,8 @@ def monitor_begin():
         task_arr.append(last_process)
     for item in reversed(task_queue):
         task_arr.append(item.name)
-    send_hint(json.dumps(task_arr, ensure_ascii=False))
+    latest_tasks = task_arr[-5:] # only show the last 5 tasks
+    send_hint(json.dumps(latest_tasks, ensure_ascii=False))
     send_todo()
     send_status('')
     #print("send img")