job for assets and structures modifications for how pages are called.
This commit is contained in:
@@ -83,27 +83,20 @@ class GetAssets extends Command
|
|||||||
|
|
||||||
$esi = new Eseye($authentication);
|
$esi = new Eseye($authentication);
|
||||||
|
|
||||||
//Set the current page
|
|
||||||
$currentPage = 1;
|
|
||||||
//Set our default total pages, and we will refresh this later
|
|
||||||
$totalPages = 1;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$assets = $esi->page($currentPage)
|
$assets = $esi->invoke('get', '/corporations/{corporation_id}/assets/', [
|
||||||
->invoke('get', '/corporations/{corporation_id}/assets/', [
|
|
||||||
'corporation_id' => $corpId,
|
'corporation_id' => $corpId,
|
||||||
]);
|
]);
|
||||||
} catch (RequestFailedException $e) {
|
} catch (RequestFailedException $e) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
$totalPages = $assets->pages;
|
for($i = 1; $i <= $assets->pages; $i++) {
|
||||||
|
|
||||||
for($i = 1; $i <= $totalPages; $i++) {
|
|
||||||
$job = new JobProcessAsset;
|
$job = new JobProcessAsset;
|
||||||
$job->charId = $charId;
|
$job->charId = $charId;
|
||||||
$job->corpId = $corpId;
|
$job->corpId = $corpId;
|
||||||
$job->page = $i;
|
$job->page = $i;
|
||||||
|
$job->esi = $esi;
|
||||||
ProcessAssetJob::dispatch($job)->onQueue('default');
|
ProcessAssetJob::dispatch($job)->onQueue('default');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,9 +98,7 @@ class GetStructures extends Command
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$totalPages = $structures->pages;
|
for($i = 1; $i <= $structures->pages; $i++) {
|
||||||
|
|
||||||
for($i = 1; $i <= $totalPages; $i++) {
|
|
||||||
$job = new JobProcessStructure;
|
$job = new JobProcessStructure;
|
||||||
$job->charId = $charId;
|
$job->charId = $charId;
|
||||||
$job->corpId = $corpId;
|
$job->corpId = $corpId;
|
||||||
|
|||||||
Reference in New Issue
Block a user