feat(agent-office): refresh_ai_news_sentiment service helper
This commit is contained in:
@@ -43,6 +43,20 @@ async def refresh_screener_snapshot() -> Dict[str, Any]:
|
|||||||
return resp.json()
|
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]:
|
async def run_stock_screener(mode: str = "auto") -> Dict[str, Any]:
|
||||||
"""stock-lab의 스크리너 실행.
|
"""stock-lab의 스크리너 실행.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user