diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 0b4b2e185a..8b60c694b7 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -2,7 +2,6 @@ namespace App\Console; -use App\Actions\Server\ResourcesCheck; use App\Jobs\CheckAndStartSentinelJob; use App\Jobs\CheckForUpdatesJob; use App\Jobs\CheckHelperImageJob; @@ -116,7 +115,7 @@ private function checkResources($schedule): void } else { $servers = $this->allServers->get(); } - // $schedule->job(new ResourcesCheck)->everyMinute()->onOneServer(); + // $schedule->job(new \App\Jobs\ResourcesCheck)->everyMinute()->onOneServer(); foreach ($servers as $server) { $serverTimezone = $server->settings->server_timezone; @@ -126,6 +125,7 @@ private function checkResources($schedule): void if (Carbon::parse($lastSentinelUpdate)->isBefore(now()->subSeconds($server->waitBeforeDoingSshCheck()))) { // Check container status every minute if Sentinel does not activated $schedule->job(new ServerCheckJob($server))->everyMinute()->onOneServer(); + // $schedule->job(new \App\Jobs\ServerCheckNewJob($server))->everyMinute()->onOneServer(); // Check storage usage every 10 minutes if Sentinel does not activated $schedule->job(new ServerStorageCheckJob($server))->everyTenMinutes()->onOneServer(); diff --git a/app/Jobs/ServerCheckNewJob.php b/app/Jobs/ServerCheckNewJob.php index 8455c9617b..9ce52759cd 100644 --- a/app/Jobs/ServerCheckNewJob.php +++ b/app/Jobs/ServerCheckNewJob.php @@ -24,7 +24,7 @@ public function __construct(public Server $server) {} public function handle() { try { - ServerCheck::dispatch($this->server); + ServerCheck::run($this->server); } catch (\Throwable $e) { return handleError($e); }