Skip to content

Commit

Permalink
Show actual booster info retry rate in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Citrinate committed Jun 13, 2024
1 parent 8feca63 commit 82e880a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions BoosterManager/Boosters/BoosterQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ private async Task Run() {
// Reload the booster creator page
if (!await UpdateBoosterInfos().ConfigureAwait(false)) {
// Reload failed, try again later
Bot.ArchiLogger.LogGenericError(Strings.BoosterInfoUpdateFailed);
UpdateTimer(DateTime.Now.AddMinutes(Math.Min(BoosterInfosUpdateBackOffMaxMinutes, BoosterInfosUpdateBackOffMinMinutes * BoosterInfosUpdateBackOffMultiplier)));
var retryBoosterUpdateInMinutes = Math.Min(BoosterInfosUpdateBackOffMaxMinutes, BoosterInfosUpdateBackOffMinMinutes * BoosterInfosUpdateBackOffMultiplier);
Bot.ArchiLogger.LogGenericError(String.Format(Strings.BoosterInfoUpdateFailed, String.Format("{0:0.##}", retryBoosterUpdateInMinutes)));
UpdateTimer(DateTime.Now.AddMinutes(retryBoosterUpdateInMinutes));
BoosterInfosUpdateBackOffMultiplier += BoosterInfosUpdateBackOffMultiplierStep;

return;
Expand Down
4 changes: 2 additions & 2 deletions BoosterManager/Localization/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BoosterInfoUpdateFailed" xml:space="preserve">
<value>Failed to update booster information, will retry in 1 minute</value>
<comment/>
<value>Failed to update booster information, will retry in {0} minutes</value>
<comment>{0} will be replaced by a number</comment>
</data>
<data name="NotEnoughGems" xml:space="preserve">
<value>{0} more gems are needed to continue crafting boosters. Crafting will resume when more gems are available.</value>
Expand Down

0 comments on commit 82e880a

Please sign in to comment.