added requests and some old commands
This commit is contained in:
@@ -6,6 +6,7 @@ use Illuminate\Console\Command;
|
||||
|
||||
//Library
|
||||
use App\Library\Moons\MoonCalc;
|
||||
use Comamnds\Library\CommandHelper;
|
||||
|
||||
//Job
|
||||
use App\Jobs\Commands\Eve\ItemPricesUpdateJob;
|
||||
@@ -43,9 +44,19 @@ class ItemPricesUpdateCommand extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//Declare variables
|
||||
$moonHelper = new MoonCalc;
|
||||
$task = new CommandHelper('ItemPricesUpdateCommand');
|
||||
|
||||
//Set the task as started
|
||||
$task->SetStartStatus();
|
||||
|
||||
//Fetch new prices from fuzzwork.co.uk for the item pricing schemes
|
||||
$moonHelper->FetchNewPrices();
|
||||
|
||||
//ItemPricesUpdateJob::dispatch()->onQueue('default');
|
||||
//Set the task as completed
|
||||
$task->SetStopStatus();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Finances;
|
||||
|
||||
//Internal Library
|
||||
use Illuminate\Console\Command;
|
||||
use Log;
|
||||
use Carbon\Carbon;
|
||||
|
||||
//Application Library
|
||||
use App\Library\Helpers\FinanceHelper;
|
||||
use Commands\Library\CommandHelper;
|
||||
|
||||
//Models
|
||||
use App\Models\Finances\AllianceWalletJournal;
|
||||
|
||||
class UpdateAllianceWalletJournal extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'finances:UpdateJournals';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = "Update the holding corporation's finance journal.";
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//Declare variables
|
||||
$fHelper = new FinanceHelper;
|
||||
$config = config('esi');
|
||||
$task = new CommandHelper('UpdateAllianceWalletJournal');
|
||||
//Set the task as started
|
||||
$task->SetStartStatus();
|
||||
|
||||
$fHelper->GetApiWalletJournal(1, $config['primary']);
|
||||
|
||||
//Set the task as stopped
|
||||
$task->SetStopStatus();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,10 @@ class Kernel extends ConsoleKernel
|
||||
* Eve Commands
|
||||
*/
|
||||
Commands\Eve\ItemPricesUpdateCommand::class,
|
||||
/**
|
||||
* Finance Commands
|
||||
*/
|
||||
Commands\Finances\UpdateAllianceWalletJournal::class,
|
||||
/**
|
||||
* Mining Tax Commands
|
||||
*/
|
||||
@@ -57,6 +61,13 @@ class Kernel extends ConsoleKernel
|
||||
$schedule->command('data:PurgeUsers')
|
||||
->dailyAt('23:00');
|
||||
|
||||
/**
|
||||
* Finances Update Schedule
|
||||
*/
|
||||
$schedule->command('finances:UpdateJournals')
|
||||
->hourlyAt('45')
|
||||
->withoutOverlapping();
|
||||
|
||||
/**
|
||||
* Item Update Schedule
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user