Fix server readiness check and update version

number
This commit is contained in:
Andras Bacsai 2023-11-17 14:14:13 +01:00
parent 48d7c6e76f
commit d38d50dca2
7 changed files with 5 additions and 18 deletions

View File

@ -1022,10 +1022,6 @@ private function build_image()
listen [::]:80;
server_name localhost;
// real_ip_header X-Forwarded-For;
// proxy_set_header X-Real-IP \$remote_addr;
// proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
location / {
root /usr/share/nginx/html;
index index.html;

View File

@ -39,9 +39,6 @@ public function handle(): void
{
// ray("checking server status for {$this->server->id}");
try {
if (!$this->server->checkServerRediness()) {
return;
}
$containers = instant_remote_process(["docker container ls -q"], $this->server);
if (!$containers) {
return;

View File

@ -34,10 +34,7 @@ public function handle(): void
{
ray("checking server status for {$this->server->id}");
try {
if (!$this->server->checkServerRediness()) {
ray('server not ready');
return;
}
$this->server->checkServerRediness();
$this->cleanup(notify: false);
} catch (\Throwable $e) {
send_internal_notification('ServerStatusJob failed with: ' . $e->getMessage());

View File

@ -130,9 +130,6 @@ public function skipServer()
}
public function checkServerRediness()
{
if ($this->skipServer()) {
return false;
}
$serverUptimeCheckNumber = $this->unreachable_count;
$serverUptimeCheckNumberMax = 5;
@ -168,7 +165,7 @@ public function checkServerRediness()
$db->update(['status' => 'exited']);
}
}
return false;
throw new \Exception('Server is not reachable.');
}
$result = $this->validateConnection();
ray('validateConnection: ' . $result);

View File

@ -7,7 +7,7 @@
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => '4.0.0-beta.141',
'release' => '4.0.0-beta.142',
// When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'),

View File

@ -1,3 +1,3 @@
<?php
return '4.0.0-beta.141';
return '4.0.0-beta.142';

View File

@ -4,7 +4,7 @@
"version": "3.12.36"
},
"v4": {
"version": "4.0.0-beta.141"
"version": "4.0.0-beta.142"
}
}
}