Fix VMJobs timeout and error handling logic
This commit is contained in:
@@ -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']));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user