Authored by 徐炜

爬虫限制重构规则策略

... ... @@ -44,9 +44,10 @@ module.exports = (limiter, policy) => {
});
return cache.getAsync(key).then((result) => {
logger.info('qps limiter: ' + key + '@' + result);
logger.info('qps limiter: ' + key + '@' + result + ' max: ' + MAX_QPS);
if (result && _.isNumber(result)) {
if (result === -1) {
return Promise.resolve(true);
}
... ...