format rate limit code (#24)
parent
489476ae57
commit
d3be4c3413
|
@ -345,7 +345,8 @@ app.UseRateLimiter(new RateLimiterOptions()
|
||||||
new TokenBucketRateLimiterOptions(tokenLimit: myOptions.tokenLimit2,
|
new TokenBucketRateLimiterOptions(tokenLimit: myOptions.tokenLimit2,
|
||||||
queueProcessingOrder: QueueProcessingOrder.OldestFirst,
|
queueProcessingOrder: QueueProcessingOrder.OldestFirst,
|
||||||
queueLimit: myOptions.queueLimit,
|
queueLimit: myOptions.queueLimit,
|
||||||
replenishmentPeriod: TimeSpan.FromSeconds(myOptions.replenishmentPeriod),
|
replenishmentPeriod:
|
||||||
|
TimeSpan.FromSeconds(myOptions.replenishmentPeriod),
|
||||||
tokensPerPeriod: myOptions.tokensPerPeriod,
|
tokensPerPeriod: myOptions.tokensPerPeriod,
|
||||||
autoReplenishment: myOptions.autoReplenishment));
|
autoReplenishment: myOptions.autoReplenishment));
|
||||||
}
|
}
|
||||||
|
@ -355,7 +356,8 @@ app.UseRateLimiter(new RateLimiterOptions()
|
||||||
new TokenBucketRateLimiterOptions(tokenLimit: myOptions.tokenLimit,
|
new TokenBucketRateLimiterOptions(tokenLimit: myOptions.tokenLimit,
|
||||||
queueProcessingOrder: QueueProcessingOrder.OldestFirst,
|
queueProcessingOrder: QueueProcessingOrder.OldestFirst,
|
||||||
queueLimit: myOptions.queueLimit,
|
queueLimit: myOptions.queueLimit,
|
||||||
replenishmentPeriod: TimeSpan.FromSeconds(myOptions.replenishmentPeriod),
|
replenishmentPeriod:
|
||||||
|
TimeSpan.FromSeconds(myOptions.replenishmentPeriod),
|
||||||
tokensPerPeriod: myOptions.tokensPerPeriod,
|
tokensPerPeriod: myOptions.tokensPerPeriod,
|
||||||
autoReplenishment: true));
|
autoReplenishment: true));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue