vmware_id = $vmware_id; $this->serviceVCetner = $service; $this->user = $user; $this->status = $status; } /** * Execute the job. * * @return void */ public function handle() { $status = $this->serviceVCetner->CheckVirtualMachine($this->vmware_id); if ($status['error'] === true) { throw new \Exception(json_encode($status['message'])); } if ($status['data']['operations_ready'] === $this->status) { do { sleep(10); $status = $this->serviceVCetner->CheckVirtualMachine($this->vmware_id); } while ($status['data']['operations_ready'] === $this->status); } Event(new VirtualMachine_Panel_Status('Yêu cầu được xử lý thành công',$this->user)); } }