Skip to content

Commit

Permalink
make sentinel enabled env var
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed May 10, 2024
1 parent b5d9d6e commit db9a68e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ private function pull_helper_image($schedule)
{
$servers = Server::all()->where('settings.is_usable', true)->where('settings.is_reachable', true)->where('ip', '!=', '1.2.3.4');
foreach ($servers as $server) {
// $schedule->job(new PullSentinelImageJob($server))->everyFiveMinutes()->onOneServer();
if (config('coolify.is_sentinel_enabled')) {
$schedule->job(new PullSentinelImageJob($server))->everyFiveMinutes()->onOneServer();
}
$schedule->job(new PullHelperImageJob($server))->everyFiveMinutes()->onOneServer();
}
}
Expand Down
4 changes: 3 additions & 1 deletion app/Jobs/ServerStatusJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public function handle()
if ($this->server->isFunctional()) {
$this->cleanup(notify: false);
$this->removeCoolifyYaml();
// $this->server->checkSentinel();
if (config('coolify.is_sentinel_enabled')) {
$this->server->checkSentinel();
}
}
} catch (\Throwable $e) {
send_internal_notification('ServerStatusJob failed with: ' . $e->getMessage());
Expand Down
1 change: 1 addition & 0 deletions config/coolify.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
'helper_image' => env('HELPER_IMAGE', 'ghcr.io/coollabsio/coolify-helper:latest'),
'is_horizon_enabled' => env('HORIZON_ENABLED', true),
'is_scheduler_enabled' => env('SCHEDULER_ENABLED', true),
'is_sentinel_enabled' => env('SENTINEL_ENABLED', false),
];

0 comments on commit db9a68e

Please sign in to comment.