diff --git a/src/dsstats.ratings/ComboRatings.cs b/src/dsstats.ratings/ComboRatings.cs index d0b812c3..6118a231 100644 --- a/src/dsstats.ratings/ComboRatings.cs +++ b/src/dsstats.ratings/ComboRatings.cs @@ -49,16 +49,14 @@ public async Task CombineDsstatsSc2ArcadeReplays() int matches = 0; var dsstatsReplays = await GetComboDsstatsCalcDtos(dsstatsRequest, context); int dsstatsReplaysCount = dsstatsReplays.Count; - int i = 0; + List replayMatches = []; while (dsstatsReplays.Count > 0) { - i++; dsstatsReplays = dsstatsReplays.Where(x => !matchesInfo.ReplayDict.ContainsKey(x.ReplayId)) .ToList(); await InitArcadeRep(dsstatsReplays); - List replayMatches = []; foreach (var dsstatsReplay in dsstatsReplays) { @@ -76,11 +74,6 @@ public async Task CombineDsstatsSc2ArcadeReplays() matches++; } } - await StoreReplayMatches(replayMatches); - // if (i > 19) - // { - // break; - // } logger.LogInformation("Matches: {matches}/{total} ({percentage}%)", matches, dsstatsReplaysCount, dsstatsReplaysCount > 0 ? Math.Round(matches * 100.0 / (double)dsstatsReplaysCount, 2) : 0); @@ -90,6 +83,7 @@ public async Task CombineDsstatsSc2ArcadeReplays() RegionDict.Clear(); ToonIdsDict.Clear(); } + await StoreReplayMatches(replayMatches); sw.Stop(); logger.LogWarning("Matches: {matches}/{total} ({percentage}%) in {elapsed}sec", matches, dsstatsReplaysCount, dsstatsReplaysCount > 0 ? Math.Round(matches * 100.0 / (double)dsstatsReplaysCount, 2) : 0, diff --git a/src/dsstats.ratings/Program.cs b/src/dsstats.ratings/Program.cs index fcab23e2..675c137a 100644 --- a/src/dsstats.ratings/Program.cs +++ b/src/dsstats.ratings/Program.cs @@ -35,7 +35,7 @@ static void Main(string[] args) services.AddLogging(options => { options.SetMinimumLevel(LogLevel.Information); - options.AddFilter("Microsoft.EntityFrameworkCore", LogLevel.Warning); + options.AddFilter("Microsoft.EntityFrameworkCore", LogLevel.Information); options.AddConsole(); });