process wallet journal job model removed

This commit is contained in:
2020-05-10 23:35:04 -05:00
parent 806b872465
commit da39f990a5
5 changed files with 6 additions and 79 deletions

View File

@@ -11,9 +11,6 @@ use App\Library\Finances\Helper\FinanceHelper;
//Jobs
use App\Jobs\ProcessWalletJournalJob;
//Models
use App\Models\Jobs\JobProcessWalletJournal;
class HoldingFinancesCommand extends Command
{
/**
@@ -64,11 +61,7 @@ class HoldingFinancesCommand extends Command
//Dispatch a single job for each page to process
for($i = 1; $i <= $pages; $i++) {
$job = new JobProcessWalletJournal;
$job->division = 1;
$job->charId = $config['primary'];
$job->page = $i;
ProcessWalletJournalJob::dispatch($job)->onQueue('journal');
ProcessWalletJournalJob::dispatch(1, $config['primary'], $i)->onQueue('journal');
}
//Get the total pages for the journal for the sov bills from the holding corporation
@@ -76,11 +69,7 @@ class HoldingFinancesCommand extends Command
//Dispatch a job for each page to process
for($i = 1; $i <= $pages; $i++) {
$job = new JobProcessWalletJournal;
$job->division = 6;
$job->charId = $config['primary'];
$job->page = $i;
ProcessWalletJournalJob::dispatch($job)->onQueue('journal');
ProcessWalletJournalJob::dispatch(6, $config['primary'], $i)->onQueue('journal');
}
//Mark the job as finished

View File

@@ -12,7 +12,6 @@ use App\Library\Finances\Helper\FinanceHelper;
use App\Jobs\ProcessWalletJournalJob;
//Models
use App\Models\Jobs\JobProcessWalletJournal;
use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope;
@@ -103,15 +102,6 @@ class SovBillsCommand extends Command
//Get the total pages for the journal for the sov bills from the holding corporation
$pages = $finance->GetJournalPageCount(6, $config['primary']);
//Dispatch a job for each page to process
//for($i = 1; $i <= $pages; $i++) {
// $job = new JobProcessWalletJournal;
// $job->division = 6;
// $job->charId = $config['primary'];
// $job->page = $i;
// ProcessWalletJournalJob::dispatch($job)->onQueue('journal');
//}
//Try to figure it out from the command itself.
for($i = 1; $i <= $pages; $i++) {
printf("Getting page: " . $i . "\n");

View File

@@ -40,10 +40,10 @@ class ProcessWalletJournalJob implements ShouldQueue
*
* @return void
*/
public function __construct(JobProcessWalletJournal $pwj) {
$this->division = $pwj->division;
$this->charId = $pwj->charId;
$this->page = $pwj->page;
public function __construct($division, $charId, $page) {
$this->division = $division;
$this->charId = $charId;
$this->page = $page;
$this->connection = 'redis';
}

View File

@@ -1,25 +0,0 @@
<?php
namespace App\Models\Jobs;
use Illuminate\Database\Eloquent\Model;
class JobProcessStructure extends Model
{
//Table Name - Not Needed for a Job
//public $table = null;
//Timestamps
public $timestamps = false;
/**
* The attributes that are mass assignable
*
* @var array
*/
protected $fillable = [
'charId',
'corpId',
'page',
];
}

View File

@@ -1,27 +0,0 @@
<?php
namespace App\Models\Jobs;
use Illuminate\Database\Eloquent\Model;
class JobProcessWalletJournal extends Model
{
//Table Name
//public $table = 'job_process_wallet_journal';
//Timestamps
public $timestamps = false;
/**
* The attributes that are mass assignable
*
* @var array
*/
protected $fillable = [
'charId',
'division',
'page',
];
}
?>