Skip to content

Commit

Permalink
SteamWishlistDiscountNotifier: Reduce max exponential background chec…
Browse files Browse the repository at this point in the history
…k backoff to 20 minutes
  • Loading branch information
darklinkpower committed Dec 4, 2024
1 parent 2456c79 commit 0f893ff
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ private async Task WaitUntilNextCheckTimeAsync()

if (_backgroundChecksWithoutSuccess >= 5)
{
var backoffDelay = TimeSpan.FromMinutes(Math.Min(Math.Pow(2, _backgroundChecksWithoutSuccess - 5), 25));
_logger.Warn($"Multiple failed attempts: {_backgroundChecksWithoutSuccess}, increasing delay to {backoffDelay.TotalMinutes} minutes.");
var backoffDelay = TimeSpan.FromMinutes(Math.Min(Math.Pow(2, _backgroundChecksWithoutSuccess - 5), 20));
_logger.Warn($"Background check failed {_backgroundChecksWithoutSuccess} times consecutively. Applying exponential backoff: waiting {backoffDelay.TotalMinutes} minute(s) before next check.");
await Task.Delay(backoffDelay);
}
}
Expand Down

0 comments on commit 0f893ff

Please sign in to comment.