diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 9aa87e8ddb..79f5f7e6c3 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -120,7 +120,6 @@ private function checkResources($schedule): void } else { $servers = $this->allServers->get(); } - // $schedule->job(new \App\Jobs\ResourcesCheck)->everyMinute()->onOneServer(); foreach ($servers as $server) { $serverTimezone = $server->settings->server_timezone; diff --git a/app/Jobs/ServerCheckNewJob.php b/app/Jobs/ServerCheckNewJob.php index 9ce52759cd..3e8e60a31d 100644 --- a/app/Jobs/ServerCheckNewJob.php +++ b/app/Jobs/ServerCheckNewJob.php @@ -2,6 +2,7 @@ namespace App\Jobs; +use App\Actions\Server\ResourcesCheck; use App\Actions\Server\ServerCheck; use App\Models\Server; use Illuminate\Bus\Queueable; @@ -25,6 +26,7 @@ public function handle() { try { ServerCheck::run($this->server); + ResourcesCheck::dispatch($this->server); } catch (\Throwable $e) { return handleError($e); }