22 lines
499 B
PHP
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;
|
|
}
|
|
}
|