fix: dispatch time series updates

This commit is contained in:
hackerESQ
2025-05-16 19:31:44 -05:00
parent 689aa4d50b
commit 3589242996
3 changed files with 44 additions and 9 deletions
@@ -97,14 +97,9 @@ return new class extends Migration
'--force' => true,
]);
Holding::all()->groupBy('market_data.currency')->keys()->each(
fn ($currency) => dispatch(
function () use ($currency) {
CurrencyRate::timeSeriesRates(
$currency,
Transaction::min('date')
);
})
CurrencyRate::timeSeriesRates(
Holding::all()->groupBy('market_data.currency')->keys()->toArray(),
Transaction::min('date')
);
CurrencyRate::refreshCurrencyData();