Explorar el Código

!2 only show the last 5 tasks

pcacc hace 1 mes
padre
commit
4df8baccea
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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")