Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this has the intended effect. Notice that delay is negative here. This is simply to randomize new URLs that come onto the queue.

} else {
delay = this._initialRetryTime * Math.pow(2, numErrors - 1);
}
Expand Down