chart handled
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\ZaarboxPriceService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class RefreshZaarboxPrices extends Command
|
||||
{
|
||||
protected $signature = 'prices:refresh-zaarbox';
|
||||
|
||||
protected $description = 'Fetch gold price history from Zaarbox and store in cache';
|
||||
|
||||
public function handle(ZaarboxPriceService $zaarboxPriceService): int
|
||||
{
|
||||
$prices = $zaarboxPriceService->refreshCache();
|
||||
|
||||
$this->info(sprintf(
|
||||
'Zaarbox prices cached: DAILY=%d, WEEKLY=%d, MONTHLY=%d',
|
||||
count($prices['DAILY'] ?? []),
|
||||
count($prices['WEEKLY'] ?? []),
|
||||
count($prices['MONTHLY'] ?? []),
|
||||
));
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user