mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 04:15:55 +00:00
Refactor server setting model to use waitBeforeDoingSshCheck method
This commit is contained in:
1 parent
2e9ce3ed2a
commit
cec77abaa8
2 files changed
+17
-7
No files matched your search
@@ -116,12 +116,7 @@ class Kernel extends ConsoleKernel
|
||||
}
|
||||
foreach ($servers as $server) {
|
||||
$last_sentinel_update = $server->sentinel_updated_at;
|
||||
$push_interval_seconds = $server->settings->sentinel_push_interval_seconds;
|
||||
$wait_before_doing_ssh_check = $push_interval_seconds * 3;
|
||||
if ($wait_before_doing_ssh_check < 120) {
|
||||
$wait_before_doing_ssh_check = 120;
|
||||
}
|
||||
if (Carbon::parse($last_sentinel_update)->isBefore(now()->subSeconds($wait_before_doing_ssh_check))) {
|
||||
if (Carbon::parse($last_sentinel_update)->isBefore(now()->subSeconds($server->waitBeforeDoingSshCheck()))) {
|
||||
$schedule->job(new ServerCheckJob($server))->everyMinute()->onOneServer();
|
||||
}
|
||||
$serverTimezone = $server->settings->server_timezone;
|
||||
|
||||
Reference in new issue
Block a user