fix: healthy status
This commit is contained in:
parent
b6745c691b
commit
31e08a24c9
1 changed files with 5 additions and 1 deletions
|
|
@ -679,7 +679,7 @@ private function health_check()
|
||||||
"echo 'Attempt {$counter} of {$this->application->health_check_retries} | Healthcheck status: {$this->saved_outputs->get('health_check')}'"
|
"echo 'Attempt {$counter} of {$this->application->health_check_retries} | Healthcheck status: {$this->saved_outputs->get('health_check')}'"
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
if (Str::of($this->saved_outputs->get('health_check'))->contains('healthy')) {
|
if (Str::of($this->saved_outputs->get('health_check'))->replace('"', '')->value() === 'healthy') {
|
||||||
$this->newVersionIsHealthy = true;
|
$this->newVersionIsHealthy = true;
|
||||||
$this->application->update(['status' => 'running']);
|
$this->application->update(['status' => 'running']);
|
||||||
$this->execute_remote_command(
|
$this->execute_remote_command(
|
||||||
|
|
@ -689,6 +689,10 @@ private function health_check()
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (Str::of($this->saved_outputs->get('health_check'))->replace('"', '')->value() === 'unhealthy') {
|
||||||
|
$this->newVersionIsHealthy = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
$counter++;
|
$counter++;
|
||||||
sleep($this->application->health_check_interval);
|
sleep($this->application->health_check_interval);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue