fix: add timeout to sentinel process checks for improved reliability
This commit is contained in:
parent
f748fba3f7
commit
9048efaf74
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ public function handle(): void
|
||||||
$latestVersion = get_latest_sentinel_version();
|
$latestVersion = get_latest_sentinel_version();
|
||||||
|
|
||||||
// Check if sentinel is running
|
// Check if sentinel is running
|
||||||
$sentinelFound = instant_remote_process(['docker inspect coolify-sentinel'], $this->server, false);
|
$sentinelFound = instant_remote_process_with_timeout(['docker inspect coolify-sentinel'], $this->server, false, 10);
|
||||||
$sentinelFoundJson = json_decode($sentinelFound, true);
|
$sentinelFoundJson = json_decode($sentinelFound, true);
|
||||||
$sentinelStatus = data_get($sentinelFoundJson, '0.State.Status', 'exited');
|
$sentinelStatus = data_get($sentinelFoundJson, '0.State.Status', 'exited');
|
||||||
if ($sentinelStatus !== 'running') {
|
if ($sentinelStatus !== 'running') {
|
||||||
|
|
@ -33,7 +33,7 @@ public function handle(): void
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// If sentinel is running, check if it needs an update
|
// If sentinel is running, check if it needs an update
|
||||||
$runningVersion = instant_remote_process(['docker exec coolify-sentinel sh -c "curl http://127.0.0.1:8888/api/version"'], $this->server, false);
|
$runningVersion = instant_remote_process_with_timeout(['docker exec coolify-sentinel sh -c "curl http://127.0.0.1:8888/api/version"'], $this->server, false);
|
||||||
if (empty($runningVersion)) {
|
if (empty($runningVersion)) {
|
||||||
$runningVersion = '0.0.0';
|
$runningVersion = '0.0.0';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue