This commit is contained in:
Andras Bacsai
2023-06-06 08:43:01 +02:00
parent 63a2e69cc6
commit 2014183e88
6 changed files with 60 additions and 49 deletions

View File

@@ -10,21 +10,18 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
$schedule->command('horizon:snapshot')->everyFiveMinutes();
$schedule->job(new InstanceDockerCleanupJob)->everyFiveMinutes();
$schedule->job(new InstanceAutoUpdateJob)->everyFifteenMinutes();
// $schedule->job(new InstanceProxyCheckJob)->everyMinute();
if (config('app.env') === 'local') {
$schedule->command('horizon:snapshot')->everyMinute();
$schedule->job(new InstanceDockerCleanupJob)->everyMinute();
$schedule->job(new InstanceAutoUpdateJob(true))->everyMinute();
} else {
$schedule->command('horizon:snapshot')->everyFiveMinutes();
$schedule->job(new InstanceDockerCleanupJob)->everyFiveMinutes();
$schedule->job(new InstanceAutoUpdateJob)->everyFifteenMinutes();
}
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__ . '/Commands');