job for assets and structures modifications for how pages are called.

This commit is contained in:
2019-05-28 22:55:45 -05:00
parent f479a7066c
commit 38a30553b4
2 changed files with 4 additions and 13 deletions

View File

@@ -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');
}
}

View File

@@ -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;