...
|
...
|
@@ -421,6 +421,40 @@ class BaiduLinkSubmit extends global.yoho.BaseModel { |
|
|
})();
|
|
|
}
|
|
|
|
|
|
marsAll() {
|
|
|
let that = this;
|
|
|
|
|
|
return co(function* () {
|
|
|
let initData = {
|
|
|
mip: [],
|
|
|
pc: [],
|
|
|
pcUrl: 'http://www.yohomars.com',
|
|
|
mipUrl: 'http://www.yohomars.com'
|
|
|
};
|
|
|
|
|
|
let rdata = yield Promise.all([
|
|
|
redis.lrangeAsync(`${NEWSKEY}:www_yohomars_com`, 0, 1000),
|
|
|
redis.lrangeAsync(`${NEWSKEY}:mip:www_yohomars_com`, 0, 1000)
|
|
|
]);
|
|
|
|
|
|
initData.pc = _.get(rdata, '[0]', []);
|
|
|
initData.mip = _.get(rdata, '[1]', []);
|
|
|
|
|
|
rdata = yield Promise.all([
|
|
|
that.sendUrl(initData.pc, initData.pcUrl),
|
|
|
that.sendUrl(initData.mip, initData.mipUrl, 'mip')
|
|
|
]);
|
|
|
|
|
|
if (rdata[0].code !== 200 || rdata[1].code !== 200) {
|
|
|
return rdata;
|
|
|
}
|
|
|
|
|
|
initData = {};
|
|
|
|
|
|
return rdata;
|
|
|
})();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
module.exports = BaiduLinkSubmit; |
...
|
...
|
|