fix
This commit is contained in:
parent
0126286731
commit
ba769f5fb7
@ -45,7 +45,7 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
|
||||
public function handle()
|
||||
{
|
||||
if (!$this->server->isServerReady($this->tries)) {
|
||||
throw new \RuntimeException('Server is not ready.');
|
||||
throw new \RuntimeException('Server is not reachable.');
|
||||
};
|
||||
try {
|
||||
if ($this->server->isSwarm()) {
|
||||
|
@ -149,10 +149,10 @@ class Server extends BaseModel
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public function isServerReady($tries)
|
||||
public function isServerReady(int $tries = 3)
|
||||
{
|
||||
$serverUptimeCheckNumber = $this->unreachable_count + 1;
|
||||
$serverUptimeCheckNumberMax = $tries ?? 3;
|
||||
$serverUptimeCheckNumberMax = $tries;
|
||||
|
||||
ray('server: ' . $this->name);
|
||||
ray('serverUptimeCheckNumber: ' . $serverUptimeCheckNumber);
|
||||
|
Loading…
x
Reference in New Issue
Block a user