This commit is contained in:
pbao9
2026-01-27 17:24:48 +07:00
parent 057ba58760
commit d2532bcddd
20 changed files with 870 additions and 189 deletions
+10 -2
View File
@@ -60,8 +60,16 @@ class StartVmJob implements ShouldQueue
// Clear VM info cache
\Illuminate\Support\Facades\Cache::forget('vm_info_' . $product->vmware_id);
// Update status to 'processing' (e.g., 3) if needed, or leave it to WaitStatus
// Dispatch Event to Frontend
\App\Events\VirtualMachineStatusChanged::dispatch(
$this->userId,
$product->vmware_id,
'running',
__('Máy ảo đã được khởi động thành công.')
);
// Update status to 'processing' (e.g., 3) if needed, or leave it to WaitStatus
$product->update(['status' => 3]); // 3 = Processing/Pending
// Dispatch wait status job