Update server runtime and comments

This commit is contained in:
Andras Bacsai 2023-11-17 14:56:39 +01:00
parent 467471f54a
commit 4c2b3df861

View File

@ -134,11 +134,11 @@ class Server extends BaseModel
$serverUptimeCheckNumberMax = 3;
$currentTime = now()->timestamp;
$runtime5Minutes = 1 * 60;
$runtime = 30;
$isReady = false;
// Run for 1 minutes max and check every 5 seconds for 3 times
while ($currentTime + $runtime5Minutes > now()->timestamp) {
// Run for 30 seconds max and check every 5 seconds for 3 times
while ($currentTime + $runtime > now()->timestamp) {
if ($serverUptimeCheckNumber >= $serverUptimeCheckNumberMax) {
if ($this->unreachable_notification_sent === false) {
ray('Server unreachable, sending notification...');