lib/queue/request-queue.js
function retrySameUrl(error, options, callback) {

    if (options.currentRetries <= options.retries) {

        log.warn({"url" : options.url, "step" : "queue-requester.recrawlUrl", "message" : "Recrawl -  retries : " + options.currentRetries});
        options.crawlWithDelay = true;

        //TODO : async this code
        // Reinject the same request in the queue
        // 1. Remove it from the crawl history in order to support the option skipDuplicates = true
        store.getStore().removeFromHistory(options.url);
        // 2. Add it again in the queue with the same options
        queue(options, callback);

    }
    else {

      onCrawl(error, options, function(error){
        process.nextTick(function() {callback(error);});
      });
    }


  }
function retrySameUrl(error, options, callback) {

    if (options.currentRetries <= options.retries) {

        log.warn({"url" : options.url, "step" : "queue-requester.recrawlUrl", "message" : "Recrawl -  retries : " + options.currentRetries});
        options.crawlWithDelay = true;

        //TODO : async this code
        // Reinject the same request in the queue
        // 1. Remove it from the crawl history in order to support the option skipDuplicates = true
        store.getStore().removeFromHistory(options.url);
        // 2. Add it again in the queue with the same options
        queue(options, callback);

    }
    else {

      onCrawl(error, options, function(error){
        process.nextTick(function() {callback(error);});
      });
    }


  }
function retrySameUrl ( error , options , callback ) { if ( options . currentRetries <= options . retries ) { log . warn ( { "url" : options . url , "step" : "queue-requester.recrawlUrl" , "message" : "Recrawl -  retries : " + options . currentRetries } ) ; options . crawlWithDelay = true ; //TODO : async this code // Reinject the same request in the queue // 1. Remove it from the crawl history in order to support the option skipDuplicates = true store . getStore ( ) . removeFromHistory ( options . url ) ; // 2. Add it again in the queue with the same options queue ( options , callback ) ; } else { onCrawl ( error , options , function ( error ) { process . nextTick ( function ( ) { callback ( error ) ; } ) ; } ) ; } }
Recrawl an url if the maximum of retries is no yet fetched.
Otherwise call the callback onCrawl

@param the HTTP error
@param the crawl options
@param callback(error)
Recrawl an url if the maximum of retries is no yet fetched . Otherwise call the callback onCrawl