Skip to content

Commit

Permalink
Limit booster page fetch frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
Citrinate committed May 31, 2024
1 parent 645d7f7 commit edac838
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion BoosterManager/Boosters/BoosterQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ private async Task Run() {
UpdateTimer(nextBoosterTime);
Bot.ArchiLogger.LogGenericInfo(String.Format(Strings.NextBoosterCraft, String.Format("{0:T}", nextBoosterTime)));
} finally {
RunSemaphore.Release();
Utilities.InBackground(
async() => {
await Task.Delay(TimeSpan.FromSeconds(MinDelayBetweenBoosters)).ConfigureAwait(false);
RunSemaphore.Release();
}
);
}
}

Expand Down

0 comments on commit edac838

Please sign in to comment.