fix: replace hardcoded 192.168.1.122 with node122 (hostname resolves via /etc/hosts to LAN or EasyTier)

- mo_config.py: xiaoguo_host=node122, xiaoguo_api_url property
- market_screener.py, xiaoguo_scanner.py, xiaoguo_news_processor.py: use mo_config or node122 fallback
- scripts/intraday_health_check.py, scripts/ocr_client.py: node122
- EasyTier connects at 10.144.144.2 when off-LAN
This commit is contained in:
hmo
2026-06-30 02:27:52 +08:00
parent efaa20d775
commit f4b2467ae9
7 changed files with 39 additions and 8 deletions
+9 -2
View File
@@ -25,7 +25,14 @@ except ImportError:
DATA_DIR = Path(__file__).parent / "data"
DB_PATH = DATA_DIR / "mofin.db"
XIAOGUO_API = "http://192.168.1.122:18003/v1/chat/completions"
XIAOGUO_API = "http://node122:18003/v1/chat/completions" # fallback, /etc/hosts resolves to LAN or EasyTier
def _get_xiaoguo_url():
try:
from mo_config import get_config
return get_config().xiaoguo_api_url
except Exception:
return XIAOGUO_API
XIAOGUO_MODEL = "Qwen3.6-27B-MTPLX-Optimized-Speed"
MAX_ARTICLES = 5 # 每次最多分析篇数(实测5篇12s
@@ -117,7 +124,7 @@ def call_xiaoguo(articles):
clean_proxy()
opener = urllib.request.build_opener(urllib.request.ProxyHandler({}))
req = urllib.request.Request(
XIAOGUO_API, data=payload,
_get_xiaoguo_url(), data=payload,
headers={"Content-Type": "application/json"}, method="POST"
)
try: