Skip to content

Commit

Permalink
Revert "Restore sales (#1328)" (#1333)
Browse files Browse the repository at this point in the history
This reverts commit 62135eb.
  • Loading branch information
karashiiro authored Jul 21, 2024
1 parent 137aaeb commit 44e04cc
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,16 +378,16 @@ private async Task<CurrentlyShownView> FetchData(int worldId, int itemId, int nE
{
using var activity = Util.ActivitySource.StartActivity("CurrentlyShownBase.FetchData");

var csTask = CurrentlyShown.Retrieve(new CurrentlyShownQuery { WorldId = worldId, ItemId = itemId },
var cs = await CurrentlyShown.Retrieve(new CurrentlyShownQuery { WorldId = worldId, ItemId = itemId },
cancellationToken);
var hTask = History.Retrieve(new HistoryQuery { WorldId = worldId, ItemId = itemId, Count = nEntries },
cancellationToken);
await Task.WhenAll(csTask, hTask);
// var hTask = History.Retrieve(new HistoryQuery { WorldId = worldId, ItemId = itemId, Count = nEntries },
// cancellationToken);
// await Task.WhenAll(csTask, hTask);

var cs = await csTask;
var history = await hTask;
// var cs = await csTask;
// var history = await hTask;

return BuildPartialView(cs ?? new CurrentlyShown(), history ?? new History(), worldId, itemId);
return BuildPartialView(cs ?? new CurrentlyShown(), new History(), worldId, itemId);
}

private async Task<IEnumerable<CurrentlyShownView>> FetchDataBatched(IEnumerable<int> worlds,
Expand All @@ -401,13 +401,13 @@ private async Task<IEnumerable<CurrentlyShownView>> FetchDataBatched(IEnumerable
itemIds.Select(itemId => new WorldItemPair(worldId, itemId)))
.ToList();

var csTask = CurrentlyShown.RetrieveMany(new CurrentlyShownManyQuery { WorldIds = worldIds, ItemIds = itemIds },
var cs = await CurrentlyShown.RetrieveMany(new CurrentlyShownManyQuery { WorldIds = worldIds, ItemIds = itemIds },
cancellationToken);
var hTask = History.RetrieveMany(
new HistoryManyQuery { WorldIds = worldIds, ItemIds = itemIds, Count = nEntries }, cancellationToken);
await Task.WhenAll(csTask, hTask);
// var hTask = History.RetrieveMany(
// new HistoryManyQuery { WorldIds = worldIds, ItemIds = itemIds, Count = nEntries }, cancellationToken);
// await Task.WhenAll(csTask, hTask);

var cs = await csTask;
// var cs = await csTask;
var csDict = CollectListings(cs);
var history = Array.Empty<History>();
var historyDict = CollectSales(history);
Expand Down

0 comments on commit 44e04cc

Please sign in to comment.