From ca790907ef017e155ed6160db0f233c511e418cf Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Mon, 7 Oct 2024 21:55:22 +0800 Subject: [PATCH] Laravel Vapor - sync code from Shipping Portal --- app/Console/Kernel.php | 46 ++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 4eae7cb1..a0862ff1 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -41,33 +41,35 @@ class Kernel extends ConsoleKernel ->dailyAt('01:00') ->withoutOverlapping(); - //cief todo: disable commands to avoid unintentional interfering with production starts - // $schedule->command('email-do-to-vt-command') - // ->dailyAt('10:00') - // ->withoutOverlapping(); + if(env('APP_ENV') === 'production'){ + //cief todo: disable commands to avoid unintentional interfering with production starts + // $schedule->command('email-do-to-vt-command') + // ->dailyAt('10:00') + // ->withoutOverlapping(); - // $schedule->command('seasonal-segmant-company-remove-command') - // ->dailyAt('01:00') - // ->withoutOverlapping(); + // $schedule->command('seasonal-segmant-company-remove-command') + // ->dailyAt('01:00') + // ->withoutOverlapping(); - // $schedule->command('delete-bulk-download-files-command') - // ->hourly() - // ->withoutOverlapping(); + // $schedule->command('delete-bulk-download-files-command') + // ->hourly() + // ->withoutOverlapping(); - // $schedule->command('new-user-registration-expire-check-command') - // //->dailyAt('23:55') //cief todo: original, to be reverted back to this - // ->everyFifteenMinutes() - // ->withoutOverlapping(); + // $schedule->command('new-user-registration-expire-check-command') + // //->dailyAt('23:55') //cief todo: original, to be reverted back to this + // ->everyFifteenMinutes() + // ->withoutOverlapping(); - // $schedule->command('booking-expired-command') - // ->dailyAt('02:00') - // ->withoutOverlapping(); - //cief todo: disable commands to avoid unintentional interfering with production ends + // $schedule->command('booking-expired-command') + // ->dailyAt('02:00') + // ->withoutOverlapping(); + //cief todo: disable commands to avoid unintentional interfering with production - // DISABLED BY DEFAULT - // $schedule->command('purchase-order-autofill-command') - // ->dailyAt('03:00') - // ->withoutOverlapping(); + // DISABLED BY DEFAULT + // $schedule->command('purchase-order-autofill-command') + // ->dailyAt('03:00') + // ->withoutOverlapping(); + } } //Commands Version 1: Before Laravel Vapor/AWS else{