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 4c9fa6a commit f81105a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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.13-debug.3</Version>
<Version>2.11.13-debug.4</Version>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
14 changes: 12 additions & 2 deletions src/CocApi.Cache/Services/WarService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ protected override async Task ExecuteScheduledTaskAsync(CancellationToken cancel
{
string debug = "a";

int erroredWarId = 0;

try
{
SetDateVariables();
Expand Down Expand Up @@ -123,7 +125,15 @@ protected override async Task ExecuteScheduledTaskAsync(CancellationToken cancel
List<CachedClan> cachedClans = allCachedClans.Where(c => c.Tag == cachedWar.ClanTag || c.Tag == cachedWar.OpponentTag).ToList();

debug = "j";
updatingWar.Add(cachedWar.Key);
try
{
updatingWar.Add(cachedWar.Key);
}
catch (Exception)
{
erroredWarId = cachedWar.Id;
throw;
}

debug = "k";
tasks.Add(
Expand Down Expand Up @@ -158,7 +168,7 @@ protected override async Task ExecuteScheduledTaskAsync(CancellationToken cancel
}
catch (Exception e)
{
Logger.LogError(e, "ExecuteScheduledTaskAsync debug: {debug} min: {min} _id: {_id}", debug, _min, _id);
Logger.LogError(e, "ExecuteScheduledTaskAsync debug: {debug} min: {min} _id: {_id} warId: {warId}", debug, _min, _id, erroredWarId);

throw;
}
Expand Down

0 comments on commit f81105a

Please sign in to comment.