update rm deadcode

This commit is contained in:
baodev0
2026-09-27 11:42:40 +07:00
parent 82a71244ca
commit 3af59bd9c5
129 changed files with 5194 additions and 2698 deletions
@@ -20,7 +20,7 @@ use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Http;
use App\Support\TlsHttpClientFactory;
use Illuminate\Support\Facades\Log;
/**
@@ -309,14 +309,14 @@ class UpdateVmConfigJob implements ShouldQueue
$action = $powerOff ? 'stop' : 'start';
$targetState = $powerOff ? 'POWERED_OFF' : 'POWERED_ON';
Http::withoutVerifying()
TlsHttpClientFactory::vCenter()
->withHeaders(['vmware-api-session-id' => $service->token])
->post("https://{$service->apiUri}/rest/vcenter/vm/{$vmwareId}/power/{$action}");
for ($i = 0; $i < 15; $i++) {
sleep(2);
$state = Http::withoutVerifying()
$state = TlsHttpClientFactory::vCenter()
->withHeaders(['vmware-api-session-id' => $service->token])
->get("https://{$service->apiUri}/rest/vcenter/vm/{$vmwareId}")
->json('value.power_state');