Skip to content

Commit

Permalink
download currentwar if group download has issues
Browse files Browse the repository at this point in the history
  • Loading branch information
devhl-labs committed Apr 11, 2024
1 parent 2d8bcd9 commit f986df4
Show file tree
Hide file tree
Showing 2 changed files with 3 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.6</Version>
<Version>2.11.7</Version>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
3 changes: 2 additions & 1 deletion src/CocApi.Cache/Services/ClanService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ private void ExtendWarTTLWhileInCwl(CachedClan cachedClan)
cachedClan.Group.Content.State == Rest.Models.GroupState.Ended ||
cachedClan.Group.Content.Season.Month < DateTime.UtcNow.Month ||
cachedClan.Group.Content.Season.Year < DateTime.UtcNow.Year ||
(cachedClan.Group.KeepUntil.HasValue && cachedClan.Group.KeepUntil.Value.Month > DateTime.UtcNow.Month))
(cachedClan.Group.KeepUntil.HasValue && cachedClan.Group.KeepUntil.Value.Month > DateTime.UtcNow.Month) ||
cachedClan.Group.StatusCode != System.Net.HttpStatusCode.OK)
return;

// keep currentwar around an arbitrary amount of time since we are in cwl
Expand Down

0 comments on commit f986df4

Please sign in to comment.