asset job

This commit is contained in:
2019-07-05 01:39:38 -05:00
parent 27c1e0f1c1
commit 098c1585a1
2 changed files with 7 additions and 16 deletions

View File

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

View File

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