Skip to content

Commit

Permalink
异常超过最大重试次数3次后,直接放弃继续处理
Browse files Browse the repository at this point in the history
  • Loading branch information
zhegexiaohuozi committed May 15, 2017
1 parent ce9e914 commit 42945e3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ public void run() {
logger.warn("Request={} will be dropped by denyRules=[{}]", JSON.toJSONString(request), StringUtils.join(crawler.denyRules(), ","));
continue;
}
//如果启用了系统级去重机制并且为首次处理则判断一个Request是否已经被处理过了
//异常请求重试次数超过最大重试次数三次后,直接放弃处理
if (request.getCurrentReqCount() >= request.getMaxReqCount()+3) {
continue;
}
//如果启用了系统级去重机制并且为首次处理则判断一个Request是否已经被处理过了
if (!request.isSkipDuplicateFilter() && crawlerModel.isUseUnrepeated() && queue.isProcessed(request) && request.getCurrentReqCount() == 0) {
logger.info("This request has bean processed,so current request={} will be dropped!", JSON.toJSONString(request));
continue;
Expand Down

0 comments on commit 42945e3

Please sign in to comment.