Showing
1 changed file
with
5 additions
and
3 deletions
@@ -222,14 +222,16 @@ const getArticleList = () => { | @@ -222,14 +222,16 @@ const getArticleList = () => { | ||
222 | }); | 222 | }); |
223 | }; | 223 | }; |
224 | 224 | ||
225 | -// 一次推送逛的1000条 | 225 | +// 一次推送逛的10000条 |
226 | const guangMip = (req, res) => { | 226 | const guangMip = (req, res) => { |
227 | co(function*() { | 227 | co(function*() { |
228 | // 获取逛的mip链接 | 228 | // 获取逛的mip链接 |
229 | let urls = yield getArticleList(); | 229 | let urls = yield getArticleList(); |
230 | + let urlsRow = _.chunk(urls, 2000); | ||
230 | 231 | ||
231 | - // 推送所有逛mip链接 | ||
232 | - sendUrlsToBaidu({site: 'https://m.yohobuy.com', type: 'mip'}, urls); | 232 | + _.forEach(urlsRow, val => { |
233 | + sendUrlsToBaidu({site: 'https://m.yohobuy.com', type: 'mip'}, val); | ||
234 | + }); | ||
233 | })(); | 235 | })(); |
234 | res.end(); | 236 | res.end(); |
235 | }; | 237 | }; |
-
Please register or login to post a comment