this.spawnRequest = function (digest) {
var id = digest + (this.reqId++).toString();
this.runningRequests.push(id);
- // console.debug('adding request ',id,' total running requests = ',this.runningRequests);
return id;
};
if (index > -1) {
this.runningRequests.splice(index, 1);
- // console.debug('removing request ',id,' remaining requests = ',this.runningRequests);
} else {
- console.warn('cannot remove request', id, 'from', this.runningRequests, 'index is', index);
}
};
self = this;
if (processes > 0 && self.timeElapsed < timeout) {
- // console.debug('waitin on',processes,'processes',this.runningRequests);
$timeout(function () {
self.timeElapsed = self.timeElapsed + t;
self.waitFor(callback);