initial commit
This commit is contained in:
21
app/Console/Commands/PruneSnapshotsCommand.php
Normal file
21
app/Console/Commands/PruneSnapshotsCommand.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user