Files
w4rpservices/app/Console/Kernel.php
drkthunder02 cf56300676 cleaned up unnecessary commands as they got switched to working as jobs.
updated the structure library to be able to be passed the esi connection
added new jobs for the fetch stuff that was being previously done as commands.
2020-05-09 12:40:16 -05:00

117 lines
4.1 KiB
PHP

<?php
namespace App\Console;
//Internal Library
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
//Library
use Commands\Library\CommandHelper;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
Commands\Corps\GetCorpsCommand::class,
Commands\Moons\UpdateMoonPriceCommand::class,
Commands\Finances\HoldingFinancesCommand::class,
Commands\Moons\MoonMailerCommand::class,
Commands\Structures\GetStructuresCommand::class,
Commands\Assets\GetAssetsCommand::class,
Commands\Users\PurgeUsers::class,
Commands\Flex\FlexStructureCommand::class,
Commands\Data\EmptyJumpBridges::class,
Commands\Wormholes\PurgeWormholes::class,
Commands\Finances\SovBillsCommand::class,
Commands\Data\CleanStaleDataCommand::class,
//Commands\Moons\FetchMoonLedgerCommand::class,
//Commands\Moons\FetchRentalMoonLedgerCommand::class,
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
//Horizon Graph Schedule
$schedule->command('horizon:snapshot')->everyFiveMinutes();
//Command to get the holding journal finances
$schedule->command('services:HoldingJournal')
->hourly()
->withoutOverlapping();
//Command to update moon rental pricing
$schedule->command('services:UpdateMoonPrice')
->hourly()
->withoutOverlapping();
//Get the corps within the alliance
$schedule->command('services:GetCorps')
->monthlyOn(1, '09:00')
->withoutOverlapping();
//Update the moons, and send out mails for current moon rentals
$schedule->command('services:MoonMailer')
->monthlyOn(1, '00:01')
->withoutOverlapping();
//Get the structures within the alliance and their information
$schedule->command('services:GetStructures')
->dailyAt('09:00')
->withoutOverlapping();
//Get the assets for the alliance. Only saves the Liquid Ozone for jump bridges
$schedule->command('services:GetAssets')
->hourlyAt('22')
->withoutOverlapping();
//Clean old data from the database
$schedule->command('services:CleanData')
->monthlyOn(15, '18:00');
//Purge users from the database which don't belong and reset the user roles as necessary
$schedule->command('services:PurgeUsers')
->dailyAt('23:00')
->withoutOverlapping();
//Mail about payments for flex structures
$schedule->command('services:FlexStructures')
->monthlyOn(2, '00:01')
->withoutOverlapping();
//Wormhole data purge
$schedule->command('services:PurgeWormholeData')
->hourlyAt(20);
//Purge old data from the database
$schedule->command('services:CleanData')
->weekly(7, '11:00')
->withoutOverlapping();
/**
* New Commands
*/
//$schedule->command('services:FetchMoonLedgers')
// ->hourlyAt(30)
// ->withoutOverlapping();
//$schedule->command('services:FetchMoonObservers')
// ->hourlyAt(15)
// ->withoutOverlapping();
//$schedule->command('services:FetchRentalMoonObservers')
// ->hourlyAt(15)
// ->withoutOverlapping();
//$schedule->command('services:FetchRentalMoonLedgers')
// ->hourlyAt(20)
// ->withoutOverlapping();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}