updates for job connections

This commit is contained in:
2020-05-27 04:33:05 -05:00
parent 685681617c
commit 84e600fa52
12 changed files with 84 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
use Carbon\Carbon;
use Log;
//Library
use Commands\Library\CommandHelper;

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
use Carbon\Carbon;
use Log;
//Library
use Commands\Library\CommandHelper;
//Jobs
use App\Jobs\Commands\Moons\PurgeMoonLedgerJob;
class PurgeCorpMoonLedgers extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'data:PurgeCorpLedgers';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Purge old corp ledgers data';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$task = new CommandHelper('PurgeCorpLedgers');
$task->SetStartStatus();
PurgeMoonLedgerJob::dispatch();
$task->SetStopStatus();
}
}

View File

@@ -84,8 +84,6 @@ class MoonsUpdateCommand extends Command
FetchMoonLedgerJob::dispatch($charId);
}
//Set task done status
$task->SetStopStatus();
}

View File

@@ -51,7 +51,11 @@ class FetchMoonLedgerJob implements ShouldQueue
*/
public function __construct($charId)
{
//Set the character id
$this->charId = $charId;
//Set the connection
$this->connection = 'redis';
}
/**

View File

@@ -49,7 +49,11 @@ class FetchMoonObserverJob implements ShouldQueue
*/
public function __construct($charId)
{
//Set the character id
$this->charId = $charId;
//Set the connection
$this->connection = 'redis';
}
/**

View File

@@ -92,6 +92,9 @@ class MoonRentalInvoiceCreate implements ShouldQueue
//Null out unused variables when calling the construct
$this->rentals = null;
//Set the connection
$this->connection = 'redis';
}
/**

View File

@@ -43,7 +43,8 @@ class MoonRentalInvoiceVerify implements ShouldQueue
*/
public function __construct()
{
//
//Set the connection
$this->connection = 'redis';
}
/**

View File

@@ -19,7 +19,8 @@ class MoonRentalUpdate implements ShouldQueue
*/
public function __construct()
{
//
//Setup the connection
$this->connection = 'redis';
}
/**

View File

@@ -12,7 +12,7 @@ use Log;
use Carbon\Carbon;
//App Models
use App\Models\CorpMoonLedger;
use App\Models\Moon\CorpMoonLedger;
class PurgeMoonLedgerJob implements ShouldQueue
{
@@ -39,7 +39,8 @@ class PurgeMoonLedgerJob implements ShouldQueue
*/
public function __construct()
{
//
//Set the connection for the job
$this->connection = 'redis';
}
/**

View File

@@ -40,8 +40,12 @@ class GetPublicContractItemsJob implements ShouldQueue
*/
public function __construct($esi, $contract)
{
//Setup the variables
$this->esi = $esi;
$this->contractId = $contract;
//Set the connection
$this->connection = 'redis';
}
/**

View File

@@ -44,6 +44,9 @@ class GetPublicContractsJob implements ShouldQueue
}
//Set the region code
$this->region = $regionId;
//Set the connection
$this->connection = 'redis';
}
/**

View File

@@ -32,7 +32,8 @@ class PurgePublicContracts implements ShouldQueue
*/
public function __construct()
{
//Nothing to do in this part of the job
//Set the connection
$this->connection = 'redis';
}
/**