...
|
...
|
@@ -3,6 +3,7 @@ |
|
|
const cache = global.yoho.cache.master;
|
|
|
const Promise = require('bluebird');
|
|
|
const co = Promise.coroutine;
|
|
|
const config = global.yoho.config;
|
|
|
|
|
|
const HeaderModel = require('../../../doraemon/models/header');
|
|
|
|
...
|
...
|
@@ -15,23 +16,9 @@ const index = co(function* (channel) { |
|
|
});
|
|
|
|
|
|
const removeBlack = (remoteIp) => {
|
|
|
let key = `pc:limiter:${remoteIp}`,
|
|
|
key10m = `pc:limiter:10m:${remoteIp}`,
|
|
|
keyMax = `pc:limiter:max:${remoteIp}`,
|
|
|
key10mMax = `pc:limiter:10m:max:${remoteIp}`,
|
|
|
synchronizeKey = `pc:limiter:synchronize:${remoteIp}`,
|
|
|
asynchronousKey = `pc:limiter:asynchronous:${remoteIp}`,
|
|
|
spiderKey = `pc:limiter:spider:${remoteIp}`;
|
|
|
|
|
|
|
|
|
let key = `${config.app}:limiter:${remoteIp}`;
|
|
|
return Promise.all([
|
|
|
cache.delAsync(key),
|
|
|
cache.delAsync(key10m),
|
|
|
cache.delAsync(keyMax),
|
|
|
cache.delAsync(key10mMax),
|
|
|
cache.delAsync(synchronizeKey),
|
|
|
cache.delAsync(asynchronousKey),
|
|
|
cache.delAsync(spiderKey)
|
|
|
cache.delAsync(key)
|
|
|
]);
|
|
|
};
|
|
|
|
...
|
...
|
|