mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 21:43:57 +00:00
Update: laravel 8 to 12, php 7.3 to php 8.3, Jenkinsfile, Unit/Feature testing, vapor, docker
This commit is contained in:
@@ -1,121 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use App\Models\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use ZipArchive;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
//Commands Version 2: Laravel Vapor/AWS
|
||||
$isEnabled = env('COMMANDS_V2_ENABLED', false);
|
||||
if($isEnabled){
|
||||
// $schedule->command('dummy-command')
|
||||
// ->everyFiveMinutes()
|
||||
// ->withoutOverlapping();
|
||||
|
||||
$schedule->command('housekeeping-s3-files-command')
|
||||
->dailyAt('01:00')
|
||||
->withoutOverlapping();
|
||||
|
||||
$schedule->command('password-reset-token-expriration-check-command')
|
||||
->everySixHours()
|
||||
->withoutOverlapping();
|
||||
|
||||
$schedule->command('new-user-registration-expire-check-command')
|
||||
->everySixHours()
|
||||
->withoutOverlapping();
|
||||
|
||||
if(env('APP_ENV') === 'production'){
|
||||
$schedule->command('email-do-to-vt-command')
|
||||
->dailyAt('10:00')
|
||||
->withoutOverlapping();
|
||||
|
||||
$schedule->command('seasonal-segmant-company-remove-command')
|
||||
->dailyAt('01:00')
|
||||
->withoutOverlapping();
|
||||
|
||||
$schedule->command('delete-bulk-download-files-command')
|
||||
->hourly()
|
||||
->withoutOverlapping();
|
||||
|
||||
$schedule->command('booking-expired-command')
|
||||
->dailyAt('02:00')
|
||||
->withoutOverlapping();
|
||||
|
||||
// DISABLED BY DEFAULT
|
||||
// $schedule->command('purchase-order-autofill-command')
|
||||
// ->dailyAt('03:00')
|
||||
// ->withoutOverlapping();
|
||||
|
||||
// Push company module to Lark
|
||||
$schedule->command('lark:push-company-module')
|
||||
->hourly()
|
||||
->withoutOverlapping();
|
||||
// Push booking module to Lark
|
||||
$schedule->command('lark:push-booking-module')
|
||||
->hourly()
|
||||
->withoutOverlapping();
|
||||
}
|
||||
}
|
||||
//Commands Version 1: Before Laravel Vapor/AWS
|
||||
else{
|
||||
// $schedule->command('inspire')->hourly();
|
||||
$schedule->command('mail:EmailDoToVTCommand')->dailyAt('10:00')->withoutOverlapping();
|
||||
|
||||
$schedule->command('seasonalSegmantCompany:remove')
|
||||
->dailyAt('01:00')
|
||||
->appendOutputTo(storage_path().'/logs/soft-delete-seasonal-segmant-company.log')
|
||||
->withoutOverlapping();
|
||||
|
||||
$schedule->command('delete:bulk-download-files')
|
||||
->hourly()
|
||||
->appendOutputTo(storage_path().'/logs/delete-bulk-download-files.log')
|
||||
->withoutOverlapping();
|
||||
|
||||
$schedule->command('booking:expired')
|
||||
->dailyAt('02:00')
|
||||
->appendOutputTo(storage_path().'/logs/expire-booking.log')
|
||||
->withoutOverlapping();
|
||||
|
||||
// $schedule->command('purchaseOrder:autoFill')
|
||||
// ->dailyAt('03:00')
|
||||
// ->withoutOverlapping();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function commands()
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user