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:
+1
-1
@@ -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 */ }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user