diff --git a/deploy/profile-scripts/mofin_health.py b/deploy/profile-scripts/mofin_health.py index 4292f18f..75151a37 100644 --- a/deploy/profile-scripts/mofin_health.py +++ b/deploy/profile-scripts/mofin_health.py @@ -956,15 +956,14 @@ def build_report(): if _out_dir.exists(): _today = now.strftime("%Y-%m-%d") _today_files = list(_out_dir.glob(f"*{_today}*")) - _last_run_str = str(j.get("last_run_at", ""))[:10] - _is_today_run = (_last_run_str == _today) - # LLM cron 今天应按调度跑(工作日)但没有今天输出 + # 修正2026-08-10:不要求 last_run 今天(失败后 last_run 停在旧日期) + # 只要求:工作日 + 调度含工作日 + 今天无输出 _sched = str(j.get("schedule", "")) _weekday_only = ("1-5" in _sched or "mon" in _sched.lower()) _is_weekday = now.weekday() < 5 - if _is_today_run and not _today_files and (_weekday_only and _is_weekday or not _weekday_only): + if not _today_files and (_weekday_only and _is_weekday): output_missing = True - output_missing_reason = f"last_status={status}但今天无输出文件" + output_missing_reason = f"今天({_today})工作日应按调度运行但输出目录无文件(last_run={str(j.get('last_run_at',''))[:16]})" except Exception: pass pipelines.append({