diff --git a/app/Console/Commands/Structures/GetStructures.php b/app/Console/Commands/Structures/GetStructures.php index 4d624cc3b..a159b4108 100644 --- a/app/Console/Commands/Structures/GetStructures.php +++ b/app/Console/Commands/Structures/GetStructures.php @@ -15,7 +15,6 @@ use Seat\Eseye\Exceptions\RequestFailedException; use App\Jobs\ProcessStructureJob; //Models -use App\Models\Jobs\JobProcessStructure; use App\Models\Esi\EsiScope; use App\Models\Esi\EsiToken; @@ -106,11 +105,7 @@ class GetStructuresCommand extends Command $totalPages = $structures->pages; for($i = 1; $i <= $totalPages; $i++) { - $job = new JobProcessStructure; - $job->charId = $charId; - $job->corpId = $corpId; - $job->page = $currentPage; - ProcessStructureJob::dispatch($job)->onQueue('structures'); + ProcessStructureJob::dispatch($charId, $corpId, $currentPage)->onQueue('structures'); } //Mark the job as finished diff --git a/app/Jobs/ProcessStructureJob.php b/app/Jobs/ProcessStructureJob.php index 4a96aeed8..4fbd2c071 100644 --- a/app/Jobs/ProcessStructureJob.php +++ b/app/Jobs/ProcessStructureJob.php @@ -13,7 +13,6 @@ use Illuminate\Foundation\Bus\Dispatchable; use App\Library\Structures\StructureHelper; //App Models -use App\Models\Jobs\JobProcessStructure; use App\Models\Jobs\JobStatus; class ProcessStructureJob implements ShouldQueue @@ -44,11 +43,11 @@ class ProcessStructureJob implements ShouldQueue * * @return void */ - public function __construct(JobProcessStructure $jps) + public function __construct($charId, $corpId, $page) { - $this->charId = $jps->charId; - $this->corpId = $jps->corpId; - $this->page = $jps->page; + $this->charId = $charId; + $this->corpId = $corpId; + $this->page = $page; //Set the connection for the job $this->connection = 'redis'; diff --git a/app/Library/Structures/StructureHelper.php b/app/Library/Structures/StructureHelper.php index 2163a0f4e..32b0fae80 100644 --- a/app/Library/Structures/StructureHelper.php +++ b/app/Library/Structures/StructureHelper.php @@ -17,7 +17,6 @@ use App\Library\Esi\Esi; use App\Library\Lookups\LookupHelper; //App Models -use App\Models\Jobs\JobProcessStructure; use App\Models\Jobs\JobStatus; use App\Models\Structure\Structure; use App\Models\Structure\Service;