From 0598335004ffab39e0e7ae8d074b771ca0b6ba6a Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Fri, 3 May 2019 23:50:54 -0500 Subject: [PATCH] job testing --- app/Console/Commands/corpJournal.php | 21 ++++----------------- app/Console/Commands/holdingfinances.php | 14 +++++++++++++- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/app/Console/Commands/corpJournal.php b/app/Console/Commands/corpJournal.php index 7cd4341d6..2f5bff573 100644 --- a/app/Console/Commands/corpJournal.php +++ b/app/Console/Commands/corpJournal.php @@ -9,7 +9,6 @@ use Carbon\Carbon; //Libraries use Commands\Library\CommandHelper; use App\Library\Finances\Helper\FinanceHelper; -use App\Library\Esi\Esi; //Jobs use App\Jobs\ProcessWalletJournalJob; @@ -63,23 +62,11 @@ class CorpJournalCommand extends Command $corpCompleted = false; //Get the corps with structures logged in the database $corps = CorpStructure::select('corporation_id')->groupBy('corporation_id')->get(); - /* + foreach($corps as $corp) { - $charId = CorpStructure::where(['corporation_id' => $corp->corporation_id])->first(); - $finance->GetWalletJournal(1, $charId->character_id); - } - */ - - //Get the corps with structures, and dispatch jobs accordingly - foreach($corps as $corp) { - $charId = CorpStructure::where(['corporation_id' => $corp->corporation_id])->first(); - $pages = $finance->GetJournalPageCount(1, $charId->character_id); - for($i = 1; $i <= $pages; $i++) { - $job = new JobProcessWalletJournal; - $job->division = 1; - $job->charId = $charId->character_id; - $job->page = $i; - ProcessWalletJournalJob::dispatch($job); + if($charId->character_id != 93738489) { + $charId = CorpStructure::where(['corporation_id' => $corp->corporation_id])->first(); + $finance->GetWalletJournal(1, $charId->character_id); } } diff --git a/app/Console/Commands/holdingfinances.php b/app/Console/Commands/holdingfinances.php index fd3e16fa3..e69d6ffa0 100644 --- a/app/Console/Commands/holdingfinances.php +++ b/app/Console/Commands/holdingfinances.php @@ -7,6 +7,9 @@ use Illuminate\Console\Command; use Commands\Library\CommandHelper; use App\Library\Finances\Helper\FinanceHelper; +//Jobs +use App\Jobs\ProcessWalletJournalJob; + class HoldingFinancesCommand extends Command { /** @@ -49,7 +52,16 @@ class HoldingFinancesCommand extends Command $finance = new FinanceHelper(); //$finance->GetHoldingWalletJournal(1, 93738489); - $finance->GetWalletJournal(1, 93738489); + //$finance->GetWalletJournal(1, 93738489); + + $pages = $finance->GetJournalPageCount(1, 93738489); + for($i = 1; $i <= $pages; $i++) { + $job = new JobProcessWalletJournal; + $job->division = 1; + $job->charId = $charId->character_id; + $job->page = $i; + ProcessWalletJournalJob::dispatch($job); + } //Mark the job as finished $task->SetStopStatus();