Fix VMJobs timeout and error handling logic

This commit is contained in:
baodev0
2026-07-13 11:01:31 +07:00
parent cd5239b108
commit 0976e23d1a
+2 -3
View File
@@ -21,7 +21,7 @@ class VMJobs implements ShouldQueue
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public int $tries = 1;
public int $timeout = 0;
public int $timeout = 600;
protected int $data;
protected $push = null;
protected $telegram = null;
@@ -154,9 +154,8 @@ class VMJobs implements ShouldQueue
break;
}
if ($VirtualMachineStatus['error'])
if ($VirtualMachineStatus && $VirtualMachineStatus['error'])
{
$this->response = 0;
throw new \Exception(json_encode($VirtualMachineStatus['data']));
}