process wallet journal job model removed
This commit is contained in:
@@ -11,9 +11,6 @@ use App\Library\Finances\Helper\FinanceHelper;
|
|||||||
//Jobs
|
//Jobs
|
||||||
use App\Jobs\ProcessWalletJournalJob;
|
use App\Jobs\ProcessWalletJournalJob;
|
||||||
|
|
||||||
//Models
|
|
||||||
use App\Models\Jobs\JobProcessWalletJournal;
|
|
||||||
|
|
||||||
class HoldingFinancesCommand extends Command
|
class HoldingFinancesCommand extends Command
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -64,11 +61,7 @@ class HoldingFinancesCommand extends Command
|
|||||||
|
|
||||||
//Dispatch a single job for each page to process
|
//Dispatch a single job for each page to process
|
||||||
for($i = 1; $i <= $pages; $i++) {
|
for($i = 1; $i <= $pages; $i++) {
|
||||||
$job = new JobProcessWalletJournal;
|
ProcessWalletJournalJob::dispatch(1, $config['primary'], $i)->onQueue('journal');
|
||||||
$job->division = 1;
|
|
||||||
$job->charId = $config['primary'];
|
|
||||||
$job->page = $i;
|
|
||||||
ProcessWalletJournalJob::dispatch($job)->onQueue('journal');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get the total pages for the journal for the sov bills from the holding corporation
|
//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
|
//Dispatch a job for each page to process
|
||||||
for($i = 1; $i <= $pages; $i++) {
|
for($i = 1; $i <= $pages; $i++) {
|
||||||
$job = new JobProcessWalletJournal;
|
ProcessWalletJournalJob::dispatch(6, $config['primary'], $i)->onQueue('journal');
|
||||||
$job->division = 6;
|
|
||||||
$job->charId = $config['primary'];
|
|
||||||
$job->page = $i;
|
|
||||||
ProcessWalletJournalJob::dispatch($job)->onQueue('journal');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Mark the job as finished
|
//Mark the job as finished
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ use App\Library\Finances\Helper\FinanceHelper;
|
|||||||
use App\Jobs\ProcessWalletJournalJob;
|
use App\Jobs\ProcessWalletJournalJob;
|
||||||
|
|
||||||
//Models
|
//Models
|
||||||
use App\Models\Jobs\JobProcessWalletJournal;
|
|
||||||
use App\Models\Esi\EsiToken;
|
use App\Models\Esi\EsiToken;
|
||||||
use App\Models\Esi\EsiScope;
|
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
|
//Get the total pages for the journal for the sov bills from the holding corporation
|
||||||
$pages = $finance->GetJournalPageCount(6, $config['primary']);
|
$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.
|
//Try to figure it out from the command itself.
|
||||||
for($i = 1; $i <= $pages; $i++) {
|
for($i = 1; $i <= $pages; $i++) {
|
||||||
printf("Getting page: " . $i . "\n");
|
printf("Getting page: " . $i . "\n");
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ class ProcessWalletJournalJob implements ShouldQueue
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(JobProcessWalletJournal $pwj) {
|
public function __construct($division, $charId, $page) {
|
||||||
$this->division = $pwj->division;
|
$this->division = $division;
|
||||||
$this->charId = $pwj->charId;
|
$this->charId = $charId;
|
||||||
$this->page = $pwj->page;
|
$this->page = $page;
|
||||||
|
|
||||||
$this->connection = 'redis';
|
$this->connection = 'redis';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -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',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
Reference in New Issue
Block a user