job testing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user