Files
HexaHost-Panel/app/Console/Commands/PruneSnapshotsCommand.php
2026-05-17 13:26:14 +02:00

22 lines
499 B
PHP

<?php
namespace App\Console\Commands;
use App\Services\Hosting\Snapshots\SnapshotService;
use Illuminate\Console\Command;
class PruneSnapshotsCommand extends Command
{
protected $signature = 'hosting:prune-snapshots';
protected $description = 'Entfernt abgelaufene VM-Snapshots';
public function handle(SnapshotService $snapshots): int
{
$count = $snapshots->pruneExpired();
$this->info("{$count} Snapshot(s) bereinigt.");
return self::SUCCESS;
}
}