fix: strongly type symbol for market data and quote

This commit is contained in:
hackerESQ
2025-01-28 19:35:15 -06:00
parent d23d28afd8
commit 399858d09b
6 changed files with 38 additions and 16 deletions
+6 -1
View File
@@ -7,6 +7,7 @@ namespace App\Console\Commands;
use App\Models\Holding;
use App\Models\MarketData;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
class RefreshMarketData extends Command
{
@@ -57,7 +58,11 @@ class RefreshMarketData extends Command
foreach ($holdings->get() as $holding) {
$this->line('Refreshing '.$holding->symbol);
MarketData::getMarketData($holding->symbol, $force);
try {
MarketData::getMarketData($holding->symbol, $force);
} catch (\Throwable $e) {
Log::error('Could not refresh '.$holding->symbol.' ('.$e->getMessage().')');
}
}
}
}