This commit is contained in:
Andras Bacsai 2023-12-21 10:28:02 +01:00
parent 37be4a1796
commit 8939d77051
2 changed files with 4 additions and 6 deletions

View File

@ -45,8 +45,7 @@ public function __construct(public Server $server)
public function handle()
{
if (!$this->server->isServerReady($this->tries)) {
$this->fail('Server is not reachable.');
return;
return 'Server is not reachable.';
};
try {
if ($this->server->isSwarm()) {

View File

@ -164,12 +164,11 @@ public function isServerReady(int $tries = 3)
$serverUptimeCheckNumberMax = $tries;
ray('server: ' . $this->name);
ray('serverUptimeCheckNumber: ' . $serverUptimeCheckNumber);
ray('serverUptimeCheckNumberMax: ' . $serverUptimeCheckNumberMax);
// ray('server: ' . $this->name);
// ray('serverUptimeCheckNumber: ' . $serverUptimeCheckNumber);
// ray('serverUptimeCheckNumberMax: ' . $serverUptimeCheckNumberMax);
$result = $this->validateConnection();
ray($result);
if ($result) {
if ($this->unreachable_notification_sent === true) {
$this->update(['unreachable_notification_sent' => false]);