done
This commit is contained in:
@@ -15,7 +15,7 @@ import httpx
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.models import Post
|
||||
from app.models import Post, iso_utc
|
||||
from app.services.analysis import analyze_post
|
||||
from app.services.price_store import price_store
|
||||
from app.ws.manager import manager
|
||||
@@ -85,6 +85,8 @@ async def _process_entry(entry: dict, db: AsyncSession) -> Optional[Post]:
|
||||
signal=analysis.get("signal"),
|
||||
ai_confidence=analysis["confidence"],
|
||||
ai_reasoning=analysis.get("reasoning"),
|
||||
prefilter_reason=analysis.get("prefilter_reason"),
|
||||
analysis_version=analysis.get("analysis_version"),
|
||||
relevant=analysis["relevant"],
|
||||
price_impact_asset=asset if analysis["relevant"] else None,
|
||||
price_impact_m5=price_impact_m5,
|
||||
@@ -113,9 +115,11 @@ def _post_to_ws_payload(post: Post) -> dict:
|
||||
"id": post.id,
|
||||
"text": post.text,
|
||||
"source": post.source,
|
||||
"published_at": post.published_at.isoformat(),
|
||||
"published_at": iso_utc(post.published_at),
|
||||
"sentiment": post.sentiment,
|
||||
"signal": post.signal,
|
||||
"ai_confidence": post.ai_confidence,
|
||||
"ai_reasoning": post.ai_reasoning,
|
||||
"relevant": post.relevant,
|
||||
"price_impact": price_impact,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user