Skip to content

Commit

Permalink
add new resource check to kernel.php
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Nov 3, 2024
1 parent 9ff73d6 commit 6987951
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Console;

use App\Actions\Server\ResourcesCheck;
use App\Jobs\CheckAndStartSentinelJob;
use App\Jobs\CheckForUpdatesJob;
use App\Jobs\CheckHelperImageJob;
Expand Down Expand Up @@ -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;
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/ServerCheckNewJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6987951

Please sign in to comment.