fail job instead of runtime exception

This commit is contained in:
Andras Bacsai
2023-12-21 09:49:18 +01:00
parent 5fb5845e90
commit 9af3ce4be5
4 changed files with 5 additions and 4 deletions

View File

@@ -45,7 +45,8 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
public function handle()
{
if (!$this->server->isServerReady($this->tries)) {
throw new \RuntimeException('Server is not reachable.');
$this->fail('Server is not reachable.');
return;
};
try {
if ($this->server->isSwarm()) {