fix: incorrect limiter key in triggerLimiter
This commit is contained in:
parent
5b0e27465b
commit
5a22564526
@ -108,7 +108,7 @@ class NetScheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async triggerLimiter(task: string, proxy: string): Promise<void> {
|
async triggerLimiter(task: string, proxy: string): Promise<void> {
|
||||||
const limiterId = proxy + "-" + task;
|
const limiterId = "proxy-" + proxy + "-" + task;
|
||||||
if (!this.proxyLimiters[limiterId]) {
|
if (!this.proxyLimiters[limiterId]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -252,6 +252,10 @@ class NetScheduler {
|
|||||||
|
|
||||||
const netScheduler = new NetScheduler();
|
const netScheduler = new NetScheduler();
|
||||||
const videoInfoRateLimiterConfig: RateLimiterConfig[] = [
|
const videoInfoRateLimiterConfig: RateLimiterConfig[] = [
|
||||||
|
{
|
||||||
|
window: new SlidingWindow(redis, 0.3),
|
||||||
|
max: 1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
window: new SlidingWindow(redis, 3),
|
window: new SlidingWindow(redis, 3),
|
||||||
max: 5,
|
max: 5,
|
||||||
|
Loading…
Reference in New Issue
Block a user