fix: analyst ratings timeout + add accession column to institution_filings
- Add 6s server-side timeout to Yahoo Finance quoteSummary (Promise.race) so the backend responds with stale data instead of hanging indefinitely. Stale cache is served on error (router.ts:1895-1898), matching ADR-0009. - Hoist YahooFinance to a module-level singleton (getYf()) so the crumb/cookie is fetched once, not per call. Matches YFinanceAdapter pattern. - Add suppressNotices for yahooSurvey to reduce log noise. - Add accession column to institution_filings (schema.sql + migration in client.ts) and thread it through both secDataFetcher.ts INSERT paths (13D/G and 13F-HR). Fixes recurring `no such column: accession` error in new13daProducer alert tick. - new13daProducer.ts needs no changes - its SELECT accession query now works.
This commit is contained in:
@@ -57,6 +57,7 @@ function runMigrations(db: DatabaseSync): void {
|
||||
`ALTER TABLE adapter_queue ADD COLUMN error TEXT`,
|
||||
`ALTER TABLE adapter_queue ADD COLUMN scheduled_for TEXT`,
|
||||
`ALTER TABLE insider_transactions ADD COLUMN accession TEXT`,
|
||||
`ALTER TABLE institution_filings ADD COLUMN accession TEXT`,
|
||||
`ALTER TABLE x_credentials ADD COLUMN fred_api_key_enc TEXT`,
|
||||
`ALTER TABLE users ADD COLUMN status TEXT NOT NULL DEFAULT 'active'`,
|
||||
// Onboarding / risk posture fields added after early installs (CREATE IF NOT EXISTS does not alter).
|
||||
|
||||
Reference in New Issue
Block a user