This commit is contained in:
2019-05-30 00:24:11 -05:00
parent 155f9326b5
commit df21c42353

View File

@@ -102,19 +102,20 @@ class ProcessStructureJob implements ShouldQueue
if(isset($info->solar_system_id)) {
$solarName = $this->GetSolarSystemName($info->solar_system_id);
//Record the structure information into the database
//Find if the structure exists
$found = Structure::where(['structure_id' => $structure->structure_id])->get();
if($found) {
$this->UpdateExistingStructure($structure, $info, $solarName);
} else {
$this->StoreNewStructure($structure, $info, $solarName);
}
} else {
Log::critical("Couldn't get solar system name for structure " . $structure->structure_id);
Log::critical("Check access lists.");
}
$solarName = null;
}
//Record the structure information into the database
//Find if the structure exists
$found = Structure::where(['structure_id' => $structure->structure_id])->get();
if(!$found) {
$this->StoreNewStructure($structure, $info, $solarName);
} else {
$this->UpdateExistingStructure($structure, $info, $solarName);
}
}
}