format rate limit code (#24)

pull/26/head
Rick Anderson 2022-08-24 12:37:33 -10:00 committed by GitHub
parent 489476ae57
commit d3be4c3413
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -345,7 +345,8 @@ app.UseRateLimiter(new RateLimiterOptions()
new TokenBucketRateLimiterOptions(tokenLimit: myOptions.tokenLimit2,
queueProcessingOrder: QueueProcessingOrder.OldestFirst,
queueLimit: myOptions.queueLimit,
replenishmentPeriod: TimeSpan.FromSeconds(myOptions.replenishmentPeriod),
replenishmentPeriod:
TimeSpan.FromSeconds(myOptions.replenishmentPeriod),
tokensPerPeriod: myOptions.tokensPerPeriod,
autoReplenishment: myOptions.autoReplenishment));
}
@ -355,7 +356,8 @@ app.UseRateLimiter(new RateLimiterOptions()
new TokenBucketRateLimiterOptions(tokenLimit: myOptions.tokenLimit,
queueProcessingOrder: QueueProcessingOrder.OldestFirst,
queueLimit: myOptions.queueLimit,
replenishmentPeriod: TimeSpan.FromSeconds(myOptions.replenishmentPeriod),
replenishmentPeriod:
TimeSpan.FromSeconds(myOptions.replenishmentPeriod),
tokensPerPeriod: myOptions.tokensPerPeriod,
autoReplenishment: true));
}