diff --git a/app/Console/Commands/GetAssets.php b/app/Console/Commands/GetAssets.php index ec141a0e5..daea9b7e5 100644 --- a/app/Console/Commands/GetAssets.php +++ b/app/Console/Commands/GetAssets.php @@ -83,27 +83,20 @@ class GetAssets extends Command $esi = new Eseye($authentication); - //Set the current page - $currentPage = 1; - //Set our default total pages, and we will refresh this later - $totalPages = 1; - try { - $assets = $esi->page($currentPage) - ->invoke('get', '/corporations/{corporation_id}/assets/', [ + $assets = $esi->invoke('get', '/corporations/{corporation_id}/assets/', [ 'corporation_id' => $corpId, ]); } catch (RequestFailedException $e) { // } - $totalPages = $assets->pages; - - for($i = 1; $i <= $totalPages; $i++) { + for($i = 1; $i <= $assets->pages; $i++) { $job = new JobProcessAsset; $job->charId = $charId; $job->corpId = $corpId; $job->page = $i; + $job->esi = $esi; ProcessAssetJob::dispatch($job)->onQueue('default'); } } diff --git a/app/Console/Commands/GetStructures.php b/app/Console/Commands/GetStructures.php index 16f72683c..8e8db9c24 100644 --- a/app/Console/Commands/GetStructures.php +++ b/app/Console/Commands/GetStructures.php @@ -98,9 +98,7 @@ class GetStructures extends Command return null; } - $totalPages = $structures->pages; - - for($i = 1; $i <= $totalPages; $i++) { + for($i = 1; $i <= $structures->pages; $i++) { $job = new JobProcessStructure; $job->charId = $charId; $job->corpId = $corpId;