|
|
@@ -230,6 +230,16 @@ def run_decode_hourly_stats_job() -> None:
|
|
|
pending = stats["pending"]
|
|
|
running = stats["running"]
|
|
|
fail = stats["fail"]
|
|
|
+ executed_in_window = success + running + fail
|
|
|
+ if executed_in_window <= 0:
|
|
|
+ logger.info(
|
|
|
+ "当前统计窗口无已执行任务,跳过推送 window=[{}, {}) total={} pending={}",
|
|
|
+ window_start.strftime("%Y-%m-%d %H:%M:%S"),
|
|
|
+ window_end.strftime("%Y-%m-%d %H:%M:%S"),
|
|
|
+ total,
|
|
|
+ pending,
|
|
|
+ )
|
|
|
+ return
|
|
|
fail_rate = (fail / total) if total > 0 else 0.0
|
|
|
success_rate = (success / total) if total > 0 else 0.0
|
|
|
today_stats = _fetch_today_stats(now)
|