lib/decider/tasks/loop.js
function Loop(name, deps, fragment, loopFn, options) {
  if (!(this instanceof Loop)) {
    return new Loop(name, deps, fragment, loopFn, options);
  }

  Task.apply(this, Array.prototype.slice.call(arguments));

  this.fragment = fragment;

  this.loopFn = (_.isFunction(loopFn)) ? loopFn : function (input) { return [input]; };
  this.options = options || {};
}
function Loop(name, deps, fragment, loopFn, options) {
  if (!(this instanceof Loop)) {
    return new Loop(name, deps, fragment, loopFn, options);
  }

  Task.apply(this, Array.prototype.slice.call(arguments));

  this.fragment = fragment;

  this.loopFn = (_.isFunction(loopFn)) ? loopFn : function (input) { return [input]; };
  this.options = options || {};
}
function Loop ( name , deps , fragment , loopFn , options ) { if ( ! ( this instanceof Loop ) ) { return new Loop ( name , deps , fragment , loopFn , options ) ; } Task . apply ( this , Array . prototype . slice . call ( arguments ) ) ; this . fragment = fragment ; this . loopFn = ( _ . isFunction ( loopFn ) ) ? loopFn : function ( input ) { return [ input ] ; } ; this . options = options || { } ; }
The loop executes in batches to help alleviate rate limit exceptions
The number of items to proccess per batch and the delay between batches are both
configurable
@constructor
The loop executes in batches to help alleviate rate limit exceptions The number of items to proccess per batch and the delay between batches are both configurable