modified the get market data command
created the purge market data command modified the public contracts command
This commit is contained in:
@@ -2,7 +2,15 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
//Internal Library
|
||||
use Illuminate\Console\Command;
|
||||
use Log;
|
||||
|
||||
//Library
|
||||
use Commands\Library\CommandHelper;
|
||||
|
||||
//Jobs
|
||||
use App\Jobs\Commands\Market\GetMarketRegionOrderJob;
|
||||
|
||||
class GetMarketDataCommand extends Command
|
||||
{
|
||||
@@ -37,6 +45,26 @@ class GetMarketDataCommand extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
$task = new CommandHelper('GetMarketData');
|
||||
$task->SetStartStatus();
|
||||
|
||||
$regions = [
|
||||
'Immensea' => 10000025,
|
||||
'Catch' => 10000014,
|
||||
'Tenerifis' => 10000061,
|
||||
'The Forge' => 10000002,
|
||||
'Impass' => 10000031,
|
||||
'Esoteria' => 10000039,
|
||||
'Detorid' => 10000005,
|
||||
'Omist' => 10000062,
|
||||
'Feythabolis' => 10000056,
|
||||
'Insmother' => 10000009,
|
||||
];
|
||||
|
||||
foreach($regions as $key => $value) {
|
||||
GetMarketRegionOrderJob::dispatch($value);
|
||||
}
|
||||
|
||||
$task->SetStopStatus();
|
||||
}
|
||||
}
|
||||
|
||||
50
app/Console/Commands/Market/PurgeMarketDataCommand.php
Normal file
50
app/Console/Commands/Market/PurgeMarketDataCommand.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
//Internal Library
|
||||
use Illuminate\Console\Command;
|
||||
use Log;
|
||||
|
||||
//Library
|
||||
use Commands\Library\CommandHelper;
|
||||
|
||||
//Jobs
|
||||
use App\Jobs\Commands\Market\PurgeMarketRegionOrderJob;
|
||||
|
||||
class PurgeMarketDataCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'services:PurgeMarketData';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Purges old market data from the database';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
PurgeMarketDataJob::dispatch();
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,15 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
//Internal Library
|
||||
use Illuminate\Console\Command;
|
||||
use Log;
|
||||
|
||||
//Library
|
||||
use Commands\Library\CommandHelper;
|
||||
|
||||
//Jobs
|
||||
use App\Jobs\Commands\PublicContracts\GetPublicContractsJob;
|
||||
|
||||
class PublicContractsCommand extends Command
|
||||
{
|
||||
@@ -37,6 +45,9 @@ class PublicContractsCommand extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$task = new CommandHelper('PublicContracts');
|
||||
$task->SetStartStatus();
|
||||
|
||||
$regions = [
|
||||
'Immensea' => 10000025,
|
||||
'Catch' => 10000014,
|
||||
@@ -51,7 +62,9 @@ class PublicContractsCommand extends Command
|
||||
];
|
||||
|
||||
foreach($regions as $key => $value) {
|
||||
PublicContractsJob::dispatch($value);
|
||||
GetPublicContractsJob::dispatch($value);
|
||||
}
|
||||
|
||||
$task->SetStopStatus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user