private async Task RebuildSiteMap() { _logger.LogInformation("Starting rebuilding sitemap."); var features = await _elasticSearchGateway.GetAllPointsOfInterest(); _pointsOfInterestFilesCreatorExecutor.Create(features); _logger.LogInformation("Finished rebuilding sitemap."); }
private async Task RebuildImages() { _logger.LogInformation("Starting rebuilding images database."); using (var stream = _latestFileFetcherExecutor.Get()) { var features = await _elasticSearchGateway.GetAllPointsOfInterest(); var featuresUrls = features.SelectMany(f => f.Attributes.GetNames() .Where(n => n.StartsWith(FeatureAttributes.IMAGE_URL)) .Select(k => f.Attributes[k].ToString()) ); var urls = await _osmRepository.GetImagesUrls(stream); await _imagesUrlsStorageExecutor.DownloadAndStoreUrls(urls.Union(featuresUrls).ToList()); } _logger.LogInformation("Finished rebuilding images database."); }