Skip to content

Commit

Permalink
return backfill to order by date, batch size 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
drewgillies committed Apr 6, 2021
1 parent b72d197 commit e5aa6b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/GalleryTools/Commands/BackfillCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ public async Task Collect(SqlConnection connection, Uri serviceDiscoveryUri, Dat
{
packages = packages.Include(QueryIncludes);
}

packages = packages
.Where(p => p.Created < lastCreateTime && p.Created > startTime)
.OrderBy(p => p.PackageRegistration.Id);
.Where(p => p.PackageStatusKey == PackageStatus.Available || p.PackageStatusKey == PackageStatus.Validating)
.OrderBy(p => p.Created);
if (LimitTo > 0)
{
packages = packages.Take(LimitTo);
Expand Down
2 changes: 2 additions & 0 deletions src/GalleryTools/Commands/BackfillTfmMetadataCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public sealed class BackfillTfmMetadataCommand : BackfillCommand<List<string>>

protected override Expression<Func<Package, object>> QueryIncludes => p => p.SupportedFrameworks;

protected override int CollectBatchSize => 1000;

public static void Configure(CommandLineApplication config)
{
Configure<BackfillTfmMetadataCommand>(config);
Expand Down

0 comments on commit e5aa6b1

Please sign in to comment.