khanegi setting and prices records
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\PriceSnapshotService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class PrunePriceSnapshotsCommand extends Command
|
||||
{
|
||||
protected $signature = 'prices:prune';
|
||||
|
||||
protected $description = 'Downsample and prune price history (daily at midnight)';
|
||||
|
||||
public function handle(PriceSnapshotService $snapshots): int
|
||||
{
|
||||
$stats = $snapshots->pruneHistory();
|
||||
$this->info(json_encode($stats, JSON_UNESCAPED_UNICODE));
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user