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