feat: 加入限流算法,限制搜书时间

This commit is contained in:
zhiyu1998 2023-04-11 13:45:13 +08:00
parent 97b12630b0
commit 77afea7470

View File

@ -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('分配少于当前的容量!');
}
}
}