From 251b52e427bc47a4be00d3fa95a35e37c4ea18f9 Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 10 Aug 2026 18:41:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20mofin=5Fhealth=20=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E6=A3=80=E6=B5=8B=E9=80=BB=E8=BE=91=EF=BC=88?= =?UTF-8?q?=E4=B8=8D=E4=BE=9D=E8=B5=96last=5Frun=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/mofin_health.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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({