@@ -255,8 +255,7 @@ discard block |
||
| 255 | 255 | |
| 256 | 256 | $instanceState->setReachability(InstanceState::REACHABLE); |
| 257 | 257 | } |
| 258 | - } |
|
| 259 | - catch (\Exception $e) |
|
| 258 | + } catch (\Exception $e) |
|
| 260 | 259 | { |
| 261 | 260 | // Mark the instance as unreachable |
| 262 | 261 | $message = 'Instance {instanceName} not reachable, will wait for {cycles} cycles before retrying. |
@@ -270,8 +269,7 @@ discard block |
||
| 270 | 269 | |
| 271 | 270 | $instanceState->setReachability(InstanceState::UNREACHABLE); |
| 272 | 271 | } |
| 273 | - } |
|
| 274 | - else |
|
| 272 | + } else |
|
| 275 | 273 | { |
| 276 | 274 | // Wait for some cycles and then mark unreachable instances as maybe reachable |
| 277 | 275 | if ($instanceState->getRetryCount() === self::UNREACHABLE_CYCLES_UNTIL_RETRY - 1) |
@@ -282,8 +280,7 @@ discard block |
||
| 282 | 280 | $this->_logger->info('Retrying instance {instanceName} during next cycle', [ |
| 283 | 281 | 'instanceName' => $instanceName, |
| 284 | 282 | ]); |
| 285 | - } |
|
| 286 | - else |
|
| 283 | + } else |
|
| 287 | 284 | $instanceState->incrementRetryCount(); |
| 288 | 285 | } |
| 289 | 286 | } |