From ad6a90d62335c0afd463180bf67d21b0756ed9c3 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sun, 10 May 2020 23:13:05 -0500 Subject: [PATCH] updated assets in order to not use a model to get rid of extra models that we don't need --- app/Console/Commands/Assets/GetAssets.php | 6 +----- app/Jobs/ProcessAssetsJob.php | 8 ++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/Console/Commands/Assets/GetAssets.php b/app/Console/Commands/Assets/GetAssets.php index bb37a9fbd..d894fcd0d 100644 --- a/app/Console/Commands/Assets/GetAssets.php +++ b/app/Console/Commands/Assets/GetAssets.php @@ -93,11 +93,7 @@ class GetAssetsCommand extends Command $pages = $assets->pages; for($i = 1; $i <= $pages; $i++) { - $job = new JobProcessAsset; - $job->charId = $charId; - $job->corpId = $corpId; - $job->page = $i; - ProcessAssetsJob::dispatch($job)->onQueue('assets'); + ProcessAssetsJob::dispatch($charId, $corpId, $i)->onQueue('assets'); } } } diff --git a/app/Jobs/ProcessAssetsJob.php b/app/Jobs/ProcessAssetsJob.php index 8edf78396..64f1652c0 100644 --- a/app/Jobs/ProcessAssetsJob.php +++ b/app/Jobs/ProcessAssetsJob.php @@ -58,11 +58,11 @@ class ProcessAssetsJob implements ShouldQueue * * @return void */ - public function __construct(JobProcessAsset $jpa) + public function __construct($charId, $corpId, $page) { - $this->charId = $jpa->charId; - $this->corpId = $jpa->corpId; - $this->page = $jpa->page; + $this->charId = $charId; + $this->corpId = $corpId; + $this->page = $page; //Set the connection for the job $this->connection = 'redis';