item updates weren't working for whatever reason
This commit is contained in:
54
app/Console/Commands/Eve/ItemPricesUpdateCommand.php
Normal file
54
app/Console/Commands/Eve/ItemPricesUpdateCommand.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Eve;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Log;
|
||||
|
||||
//Library
|
||||
use Command\Library\CommandHelper;
|
||||
use App\Library\Moons\MoonCalc;
|
||||
|
||||
class ItemPricesUpdateCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'services:ItemPriceUpdate';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Update mineral and ore prices';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$task = new CommandHelper('ItemPriceUpdate');
|
||||
$task->SetStartStatus();
|
||||
|
||||
$moonHelper = new MoonCalc;
|
||||
|
||||
$moonHelper->FetchNewPrices();
|
||||
|
||||
$task->SetStopStatus();
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ class Kernel extends ConsoleKernel
|
||||
Commands\Data\CleanStaleDataCommand::class,
|
||||
Commands\Moons\MoonsUpdateCommand::class,
|
||||
Commands\Data\PurgeCorpMoonLedgers::class,
|
||||
Commands\Eve\ItemPricesUpdateCommand::class,
|
||||
/**
|
||||
* Rental Moon Commands
|
||||
*/
|
||||
@@ -84,6 +85,13 @@ class Kernel extends ConsoleKernel
|
||||
->monthly();
|
||||
$schedule->command('services:PurgeUsers')
|
||||
->dailyAt('23:00');
|
||||
|
||||
/**
|
||||
* Item Update Schedule
|
||||
*/
|
||||
$schedule->command('services:ItemPriceUpdate')
|
||||
->hourlyAt('30')
|
||||
->withoutOverlapping();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user