asset job
This commit is contained in:
@@ -109,7 +109,7 @@ class GetAssetsCommand extends Command
|
||||
}
|
||||
|
||||
$pages = $assets->pages;
|
||||
/*
|
||||
|
||||
for($i = 1; $i < $pages; $i++) {
|
||||
$job = new JobProcessAsset;
|
||||
$job->charId = $charId;
|
||||
@@ -117,18 +117,5 @@ class GetAssetsCommand extends Command
|
||||
$job->page = $i;
|
||||
ProcessAssetsJob::dispatch($job)->onQueue('assets');
|
||||
}
|
||||
*/
|
||||
for($i = 1; $i < $pages; $i++) {
|
||||
$currentPage = $i;
|
||||
|
||||
$aHelper = new AssetHelper($charId, $corpId, $currentPage);
|
||||
|
||||
//Get a page of assets
|
||||
$assets = $aHelper->GetAssetsByPage();
|
||||
|
||||
foreach($assets as $asset) {
|
||||
$aHelper->StoreNewAsset($asset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,8 +93,12 @@ class ProcessAssetsJob implements ShouldQueue
|
||||
|
||||
//Cycle through the assets, and attmept to store them.
|
||||
foreach($assets as $asset) {
|
||||
//Attempt to store the asset
|
||||
$aHelper->StoreNewAsset($asset);
|
||||
//If the asset is in one of the locations we want, then store
|
||||
//or update the asset
|
||||
if(in_array($asset->location_flag, $this->location_array)) {
|
||||
//Attempt to store the asset
|
||||
$aHelper->StoreNewAsset($asset);
|
||||
}
|
||||
}
|
||||
|
||||
//Purge Stale Data
|
||||
|
||||
Reference in New Issue
Block a user