structure stuff

This commit is contained in:
2019-05-30 00:11:42 -05:00
parent 943eee0b9d
commit 6f85366c9c

View File

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