Commit ee86d78b by chenweitao

Merge branch 'mlbWork' into 'master'

Mlb work

See merge request !70
parents 355e6754 da89439e
......@@ -150,7 +150,7 @@ public class HotSearchCacheDAO {
collection.replaceOne(query, nowDoc);
} else {
nowDoc = new Document();
int durationNow = getDuration(type, 0);
int durationNow = 1;
nowDoc.put("_id", id);
nowDoc.put("url", url);
nowDoc.put("name", name);
......
......@@ -369,6 +369,12 @@ public class GatherTimer {
public void crawlerMaiMaiHotSearch(){
Date date = DateUtils.getMillSecondTime(new Date());
List<HotSearchList> list = MaiMaiHotSearchCrawler.getMaiMaiHotData(date);
int i=0;
while (list.size()==0 && i<10){
ZhiWeiTools.sleep(5000L);
list = MaiMaiHotSearchCrawler.getMaiMaiHotData(date);
i++;
}
TipsUtils.addHotList(HotSearchType.脉脉热榜.name(),list);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment