persist news stories and request article content

This commit is contained in:
dirtydishes 2026-05-19 20:02:35 -04:00
parent 7d25608b35
commit 93b9152345
3 changed files with 17 additions and 5 deletions

View file

@ -92,7 +92,8 @@ import {
fetchNearestOptionNBBOForPrints,
fetchSmartMoneyEventsByPacketIds,
fetchClassifierHitsByPacketIds,
fetchRecentOptionPrints
fetchRecentOptionPrints,
insertNewsStory
} from "@islandflow/storage";
import type { EquityPrintQueryFilters } from "@islandflow/storage";
import {
@ -1277,6 +1278,7 @@ const run = async () => {
for await (const msg of newsSubscription.messages) {
try {
const payload = NewsStorySchema.parse(newsSubscription.decode(msg));
await insertNewsStory(clickhouse, payload);
await fanoutLive({ channel: "news" }, payload, "news");
msg.ack();
} catch (error) {