fix(mofin_health): 今天已运行的LLM job不报output_missing误报

This commit is contained in:
xxm
2026-08-21 14:13:50 +08:00
parent 6ed49a62de
commit 981d35e1cf
+4 -1
View File
@@ -1062,7 +1062,10 @@ def build_report():
_sched = str(j.get("schedule", ""))
_weekday_only = ("1-5" in _sched or "mon" in _sched.lower())
_is_weekday = now.weekday() < 5
if not _today_files and (_weekday_only and _is_weekday):
# 如果 job 今天已运行(last_run 今天),不报 output_missingSILENT 是正常的)
_last_run_date = str(j.get('last_run_at', ''))[:10]
_ran_today = (_last_run_date == _today)
if not _today_files and (_weekday_only and _is_weekday) and not _ran_today:
output_missing = True
output_missing_reason = f"今天({_today})工作日应按调度运行但输出目录无文件(last_run={str(j.get('last_run_at',''))[:16]})"
except Exception: