22 lines
541 B
PHP
22 lines
541 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Services\Hosting\Provisioning\VmidReservationService;
|
|
use Illuminate\Console\Command;
|
|
|
|
class ReleaseVmidReservationsCommand extends Command
|
|
{
|
|
protected $signature = 'hosting:release-vmids';
|
|
|
|
protected $description = 'Release VMIDs after retention period (default 48h)';
|
|
|
|
public function handle(VmidReservationService $service): int
|
|
{
|
|
$count = $service->releaseDue();
|
|
$this->info("Released {$count} VMID reservation(s).");
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|