Skip to content

Commit

Permalink
fix: include station lookup from character assets (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
Crypta-Eve authored Jan 29, 2021
1 parent 3008d50 commit 24675df
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Commands/Esi/Update/PublicInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Seat\Eveapi\Jobs\Sovereignty\Structures;
use Seat\Eveapi\Jobs\Universe\Names;
use Seat\Eveapi\Jobs\Universe\Stations;
use Seat\Eveapi\Models\Assets\CharacterAsset;
use Seat\Eveapi\Models\Assets\CorporationAsset;
use Seat\Eveapi\Models\Character\CharacterInfo;
use Seat\Eveapi\Models\Corporation\CorporationInfo;
Expand Down Expand Up @@ -74,7 +75,16 @@ public function handle()
Stations::dispatch($corporations->pluck('home_station_id')->toArray());
});

// NPC stations using corporation assets
// NPC stations using character assets
CharacterAsset::where('location_type', 'station')
->select('location_id')
->orderBy('location_id')
->distinct()
->chunk(100, function ($assets) {
Stations::dispatch($assets->pluck('location_id')->toArray());
});

// NPC stations using corporation assets
CorporationAsset::where('location_type', 'station')
->select('location_id')
->orderBy('location_id')
Expand Down

0 comments on commit 24675df

Please sign in to comment.