diff --git a/app/Models/CurrencyRate.php b/app/Models/CurrencyRate.php index 9c05df0..2136dac 100644 --- a/app/Models/CurrencyRate.php +++ b/app/Models/CurrencyRate.php @@ -134,9 +134,11 @@ class CurrencyRate extends Model if (is_array($currency)) { + $i = 1; foreach ($currency as $curr) { - dispatch(fn () => self::timeSeriesRates($curr, $start, $end)); + dispatch(fn () => self::timeSeriesRates($curr, $start, $end))->delay(now()->addSeconds(30 * $i)); + $i++; } return [];