Align branding, prompts, and deployment tooling
This commit is contained in:
@@ -244,6 +244,20 @@ class MarketStore:
|
||||
"last_news_fetch": None,
|
||||
}
|
||||
|
||||
def get_latest_news_date(self, symbol: str) -> str | None:
|
||||
"""Return the latest stored published news date for one ticker."""
|
||||
with self._connect() as conn:
|
||||
row = conn.execute(
|
||||
"""
|
||||
SELECT MAX(substr(nr.published_utc, 1, 10)) AS latest_date
|
||||
FROM news_ticker nt
|
||||
JOIN news_raw nr ON nr.id = nt.news_id
|
||||
WHERE nt.symbol = ?
|
||||
""",
|
||||
(symbol,),
|
||||
).fetchone()
|
||||
return str(row["latest_date"]).strip() if row and row["latest_date"] else None
|
||||
|
||||
def upsert_ohlc(self, symbol: str, rows: Iterable[dict[str, Any]], *, source: str = "polygon") -> int:
|
||||
timestamp = _utc_timestamp()
|
||||
count = 0
|
||||
|
||||
Reference in New Issue
Block a user