modified the get market data command

created the purge market data command
modified the public contracts command
This commit is contained in:
2020-05-15 03:53:22 -05:00
parent 77a6e6b688
commit 5b959f9d6a
3 changed files with 93 additions and 2 deletions

View File

@@ -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();
}
}

View 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();
}
}

View File

@@ -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();
}
}