Skip to content

Commit

Permalink
added debugging lines
Browse files Browse the repository at this point in the history
  • Loading branch information
devhl-labs committed Oct 17, 2024
1 parent d184829 commit 701dc8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/CocApi.Cache/CocApi.Cache.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Authors>devhl</Authors>
<Product />
<Description>Caches response from the Clash of Clans API.</Description>
<Version>2.11.12</Version>
<Version>2.11.13-debug.1</Version>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
8 changes: 7 additions & 1 deletion src/CocApi.Cache/Services/WarService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public WarService(
Options = options;
}

private int _min = int.MinValue;

protected override async Task ExecuteScheduledTaskAsync(CancellationToken cancellationToken)
{
string debug = "a";
Expand Down Expand Up @@ -83,6 +85,10 @@ protected override async Task ExecuteScheduledTaskAsync(CancellationToken cancel

debug = "d";

_min = cachedWars.Count == options.ConcurrentUpdates
? cachedWars.Min(c => c.Id)
: int.MinValue;

_id = cachedWars.Count == options.ConcurrentUpdates
? cachedWars.Max(c => c.Id)
: int.MinValue;
Expand Down Expand Up @@ -158,7 +164,7 @@ protected override async Task ExecuteScheduledTaskAsync(CancellationToken cancel
}
catch (Exception e)
{
Logger.LogError(e, "ExecuteScheduledTaskAsync debug: {debug} _id: {_id}", debug, _id);
Logger.LogError(e, "ExecuteScheduledTaskAsync debug: {debug} min: {min} _id: {_id}", debug, min, _id);

throw;
}
Expand Down

0 comments on commit 701dc8d

Please sign in to comment.