lib/sync.js
function reqeueBatch(times,interval,batch) {
    async.retry({times: times, interval: interval}, function(cb) {
      syncBatch(batch,cb);
    }, function done(err) {
      if (err) {
        log.error("failed to sync message batch", {err: err, data: batch});
      }
    });
  }
function reqeueBatch(times,interval,batch) {
    async.retry({times: times, interval: interval}, function(cb) {
      syncBatch(batch,cb);
    }, function done(err) {
      if (err) {
        log.error("failed to sync message batch", {err: err, data: batch});
      }
    });
  }
function reqeueBatch ( times , interval , batch ) { async . retry ( { times : times , interval : interval } , function ( cb ) { syncBatch ( batch , cb ) ; } , function done ( err ) { if ( err ) { log . error ( "failed to sync message batch" , { err : err , data : batch } ) ; } } ) ; }
requeue the send of messages on failure. stopping after times or first success
requeue the send of messages on failure . stopping after times or first success