From 53a78a1062be85a73d6b447bd585a5ef9617d1fd Mon Sep 17 00:00:00 2001 From: gahusb Date: Wed, 13 May 2026 23:45:51 +0900 Subject: [PATCH] feat(agent-office): refresh_ai_news_sentiment service helper --- agent-office/app/service_proxy.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/agent-office/app/service_proxy.py b/agent-office/app/service_proxy.py index 31a1d54..e650aa7 100644 --- a/agent-office/app/service_proxy.py +++ b/agent-office/app/service_proxy.py @@ -43,6 +43,20 @@ async def refresh_screener_snapshot() -> Dict[str, Any]: return resp.json() +async def refresh_ai_news_sentiment() -> Dict[str, Any]: + """stock-lab의 AI 뉴스 sentiment 분석 트리거 (08:00 cron). + + 네이버 100종목 스크래핑 + Claude Haiku 100콜 병렬 = 약 30-60초. + 여유있게 240s timeout. + """ + async with httpx.AsyncClient(timeout=240.0) as client: + resp = await client.post( + f"{STOCK_LAB_URL}/api/stock/screener/snapshot/refresh-news-sentiment" + ) + resp.raise_for_status() + return resp.json() + + async def run_stock_screener(mode: str = "auto") -> Dict[str, Any]: """stock-lab의 스크리너 실행.