Files
CatoandClaude b46062cd37 fix(market-data): keep EDGAR snapshots in memory only when the database write fails (#415)
writeSnapshot put every fundamentals and holders snapshot into a
module-level Map before writing it to research_market_snapshots, and
never dropped it. Every company the nightly /api/cron/prices facts
run refreshed stayed in the app heap until the next restart: about
0.1 MB a company, measured against live SEC data, across 506 tracked
SEC filers. The app unit is throttled at MemoryHigh=768M (killed at
1G), and the substrata crons have failed starting with the 22:07 UTC
prices run on 2026-11-20 and 2026-11-21.

The module's own comment says the in-process copy stands in where
there is no database. It now does only that: set when the row cannot
be written, dropped when it is.

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-28 21:31:52 +01:00
..