From 864562851599d7386bb36f8cd4697bf0c4a20ac8 Mon Sep 17 00:00:00 2001 From: devhl Date: Thu, 4 Apr 2024 20:47:07 -0400 Subject: [PATCH] debugging code --- src/CocApi.Cache/CocApi.Cache.csproj | 2 +- src/CocApi.Cache/Services/ClanService.cs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/CocApi.Cache/CocApi.Cache.csproj b/src/CocApi.Cache/CocApi.Cache.csproj index 67fda47..d11366c 100644 --- a/src/CocApi.Cache/CocApi.Cache.csproj +++ b/src/CocApi.Cache/CocApi.Cache.csproj @@ -6,7 +6,7 @@ devhl Caches response from the Clash of Clans API. - 2.11.6-debug.3 + 2.11.6-debug.4 2.0.0.0 2.0.0.0 true diff --git a/src/CocApi.Cache/Services/ClanService.cs b/src/CocApi.Cache/Services/ClanService.cs index 2fbf2e5..8877ff5 100644 --- a/src/CocApi.Cache/Services/ClanService.cs +++ b/src/CocApi.Cache/Services/ClanService.cs @@ -125,7 +125,15 @@ private async Task TryUpdateAsync(CachedClan cachedClan, CancellationToken cance Logger.LogWarning("a: {value}", options.DownloadCurrentWar && cachedClan.CurrentWar.Download && cachedClan.CurrentWar.IsExpired && ((cachedClan.Download && cachedClan.IsWarLogPublic == true) || !cachedClan.Download)); Logger.LogWarning("b: {value}", options.DownloadCurrentWar); Logger.LogWarning("c: {value}", cachedClan.CurrentWar.Download); + Logger.LogWarning("d: {value}", cachedClan.CurrentWar.IsExpired); + Logger.LogWarning("d1: {value}", DateTime.UtcNow > (cachedClan.CurrentWar.ExpiresAt ?? DateTime.MinValue).AddSeconds(3)); + Logger.LogWarning("d2: {value}", DateTime.UtcNow > (cachedClan.CurrentWar.KeepUntil ?? DateTime.MinValue)); + Logger.LogWarning("d3: {value}", DateTime.UtcNow); + Logger.LogWarning("d4: {value}", (cachedClan.CurrentWar.ExpiresAt ?? DateTime.MinValue).AddSeconds(3)); + Logger.LogWarning("d5: {value}", cachedClan.CurrentWar.KeepUntil ?? DateTime.MinValue); + + Logger.LogWarning("e: {value}", (cachedClan.Download && cachedClan.IsWarLogPublic == true) || !cachedClan.Download); Logger.LogWarning("f: {value}", cachedClan.Download); Logger.LogWarning("g: {value}", cachedClan.IsWarLogPublic == true);