fix: xiaoguo_signal_consumer信号堆积问题 — 使用SIGNAL_MAX_AGE_HOURS取代date(today)过滤,过期信号自动清理
根因: xiaoguo_signal_consumer仅处理今日信号(date(created_at)=today), 旧信号永远不被消费→33条堆积。SIGNAL_MAX_AGE_HOURS=4定义后未使用。 修复: 1. consumer: date(today) → created_at > -4h 年龄过滤 2. consumer: 无时效内信号时自动标记过期信号为已处理 3. consumer: 移除mo_data.get_price导入(import path冲突),改用腾讯API直连 fallback 4. intraday_health_check: 信号堆积检查也限定4h内,避免过期信号误报 5. system_audit: 同
This commit is contained in:
@@ -45,7 +45,6 @@ def fetch_quote(code):
|
||||
# Fallback: 腾讯实时行情 API
|
||||
try:
|
||||
url = f"http://qt.gtimg.cn/q={code}"
|
||||
import urllib.request
|
||||
resp = urllib.request.urlopen(url, timeout=10).read().decode("gbk")
|
||||
parts = resp.split("~")
|
||||
if len(parts) > 32:
|
||||
|
||||
Reference in New Issue
Block a user