Skip to content

Commit

Permalink
Allow offline usage for POIs #1169 - Add warning message due to failu…
Browse files Browse the repository at this point in the history
…res in the server
  • Loading branch information
HarelM committed Jun 6, 2020
1 parent e731d24 commit cb810cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IsraelHiking.API/Services/Osm/DatabasesUpdaterService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ private async Task RebuildPointsOfInterest()
{
externalFeatures.AddRange(await _elasticSearchGateway.GetExternalPoisBySource(source));
}
if (externalFeatures.GroupBy(f => f.GetId()).Any(g => g.Count() > 1))
{
_logger.LogWarning("Got duplicate id from database :-(");
}
var features = _featuresMergeExecutor.Merge(osmFeaturesTask.Result, externalFeatures);
_logger.LogInformation("Adding deleted features to new ones");
var exitingFeatures = await _elasticSearchGateway.GetAllPointsOfInterest(true);
Expand Down

0 comments on commit cb810cc

Please sign in to comment.