Browse Source

!2 only show the last 5 tasks

pcacc 1 tháng trước cách đây
mục cha
commit
4df8baccea
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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")