public async Task ProcessAsync(CatalogPageEntry page, IReadOnlyList <CatalogEntry> leaves) { var latestLeaves = leaves .GroupBy(x => new PackageIdentity(x.Id, x.Version.ToNormalizedString())) .Select(x => x .OrderByDescending(y => y.CommitTimeStamp) .First()) .ToList(); var identityToPackageKey = await _packageService.AddOrUpdatePackagesAsync(latestLeaves); await _catalogService.AddOrUpdateAsync(page, leaves, identityToPackageKey); await _packageService.SetDeletedPackagesAsUnlistedInV2Async(latestLeaves.Where(x => x.IsDelete)); }
public async Task ProcessBatchAsync(IReadOnlyList <PackageArchiveMetadata> batch) { await _packageService.AddOrUpdatePackagesAsync(batch); }