fix: queue short interest fetches on subscribe alongside quote/candles

- Add yfinance:shortinterest: and nasdaq:nasdaqShortinterest:
  to subscribe() initial queue list so short interest data is fetched proactively
  when a symbol is first viewed, rather than only on stale read
- FINRA remains bulk-schedule only via queue_schedules
This commit is contained in:
Investor Flow Build
2026-07-25 13:17:16 -04:00
parent 48872b7805
commit 3d12f50418
+1 -1
View File
@@ -418,7 +418,7 @@ export class CacheRepositoryImpl implements CacheRepository {
d.prepare('UPDATE symbol_demand SET refcount = refcount + 1, in_demand = 1 WHERE symbol=?').run(symbol);
if (before === 0) {
// First demand: schedule initial cache population (slice 1: yfinance quote + symbol meta + candles + adjustments)
for (const k of [`yfinance:quote:${symbol}`, `yfinance:symbol:${symbol}`, `yfinance:candles:${symbol}:1d`, `yfinance:adjustments:${symbol}`]) {
for (const k of [`yfinance:quote:${symbol}`, `yfinance:symbol:${symbol}`, `yfinance:candles:${symbol}:1d`, `yfinance:adjustments:${symbol}`, `yfinance:shortinterest:${symbol}`, `nasdaq:nasdaqShortinterest:${symbol}`]) {
try { await this._scheduler.queue(k); } catch { /* ignore */ }
}
}