mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
✨ feat: 加入限流算法,限制搜书时间
This commit is contained in:
parent
97b12630b0
commit
77afea7470
@ -51,7 +51,7 @@ export default class TokenBucket {
|
||||
this.capacity = newCapacity;
|
||||
this.tokens = newCapacity;
|
||||
} else {
|
||||
throw new Error('New capacity cannot be less than current tokens');
|
||||
throw new Error('分配少于当前的容量!');
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user