zhaohaipeng пре 20 часа
родитељ
комит
8992319a24
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      monitor/supply_workflow_monitor.py

+ 2 - 0
monitor/supply_workflow_monitor.py

@@ -168,6 +168,7 @@ def supply_workflow_dashboard_stat(ts: int) -> List[Dict[str, Any]]:
                        when sw.status = 1 then '开启中'
                        when sw.status = 0 then '已关闭'
                        else '未知' end AS 状态,
+                   swt.total_cnt       AS '任务数',
                    swt.init_cnt        AS '待处理',
                    swt.running_cnt     AS '运行中',
                    swt.success_cnt     AS '成功',
@@ -175,6 +176,7 @@ def supply_workflow_dashboard_stat(ts: int) -> List[Dict[str, Any]]:
             FROM supply_workflow sw
                      LEFT JOIN (
                                    SELECT workflow_id,
+                                          COUNT(task_id)                                     AS total_cnt,
                                           COUNT(DISTINCT IF(task_status = 0, task_id, NULL)) AS init_cnt,
                                           COUNT(DISTINCT IF(task_status = 1, task_id, NULL)) AS running_cnt,
                                           COUNT(DISTINCT IF(task_status = 2, task_id, NULL)) AS success_cnt,