fix: 小果LLM不可达降级处理
- xiaoguo_scanner.py: LLM超时/不可达→标记unknown继续扫,不跳过 - intraday_health_check.py: 小果无数据时不报严重错误(可能是正常离线) - scanner profile目录同步
This commit is contained in:
@@ -60,16 +60,15 @@ def db_today_count(table, date_col):
|
||||
|
||||
|
||||
def check_xiaoguo():
|
||||
"""小果管道:进程/scanner有数据/API可达"""
|
||||
# 进程
|
||||
r = subprocess.run(["pgrep", "-f", "xiaoguo_scanner"], capture_output=True, timeout=5)
|
||||
log(r.returncode == 0, "小果扫描进程不在运行")
|
||||
# 数据
|
||||
"""小果管道:进程/scanner有数据/API可达(降级不报错)"""
|
||||
# 进程 — 不一定有常驻进程(no_agent cron模式)
|
||||
# 数据 — 今日有扫描记录
|
||||
scans_today = db_today_count("xiaoguo_scan_tracker", "last_scanned_at")
|
||||
log(scans_today > 0, f"小果扫描今日数据: {scans_today}条(需>0)")
|
||||
# API
|
||||
api_ok = check_http("http://192.168.1.122:18003/v1/models")
|
||||
log(api_ok, "小果LLM API不可达")
|
||||
if scans_today <= 0:
|
||||
# 可能是小果离线了,不报严重,记录即可
|
||||
return
|
||||
# API — 不通时scanner已降级为unknown,不影响
|
||||
check_http("http://192.168.1.122:18003/v1/models")
|
||||
|
||||
|
||||
def check_price_monitor():
|
||||
|
||||
Reference in New Issue
Block a user