Authored by 周少峰

send 5 times

... ... @@ -222,14 +222,16 @@ const getArticleList = () => {
});
};
// 一次推送逛的1000条
// 一次推送逛的10000
const guangMip = (req, res) => {
co(function*() {
// 获取逛的mip链接
let urls = yield getArticleList();
let urlsRow = _.chunk(urls, 2000);
// 推送所有逛mip链接
sendUrlsToBaidu({site: 'https://m.yohobuy.com', type: 'mip'}, urls);
_.forEach(urlsRow, val => {
sendUrlsToBaidu({site: 'https://m.yohobuy.com', type: 'mip'}, val);
});
})();
res.end();
};
... ...