添加 - Token 请求最大等待队列长度

This commit is contained in:
suwings 2018-04-21 14:26:08 +08:00
parent 7e4470c716
commit d258f65f36

View File

@ -5,7 +5,8 @@ let onlyTokenManager = new baseManagerModel.ModelManager();
module.exports.addToken = (key, value) => {
if (onlyTokenManager.len > 100) {
if (onlyTokenManager.len >= 20) {
//TOken 请求最大并发数,超过则统一删除
onlyTokenManager.clear();
}
onlyTokenManager.add(key, value);