persist news stories and request article content
This commit is contained in:
parent
7d25608b35
commit
93b9152345
3 changed files with 17 additions and 5 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue