Skip to content

Commit

Permalink
DbUrlList now honors recrawlInMs option.
Browse files Browse the repository at this point in the history
Fixes #49
  • Loading branch information
hjr3 committed Nov 9, 2019
1 parent 6f85107 commit 0858ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DbUrlList.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ DbUrlList.prototype._calcNextRetryDate = function (numErrors) {
// If we want to schedule a crawl now, we subtract a random number of
// seconds. This ensures the order we crawl URLs is random; otherwise, if
// we parse a sitemap, we could get stuck crawling one host for hours.
delay = - Math.random() * YEAR_MS;
delay = - Math.random() * this._recrawlInMs;
} else {
delay = this._initialRetryTime * Math.pow(2, numErrors - 1);
}
Expand Down

0 comments on commit 0858ef0

Please sign in to comment.