How to use the d.js.wait function in d

To help you get started, we’ve selected a few d examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github malko / node-promised-redmine / lib / redmine.js View on Github external
return d.promise.error(function(e){
			if ( e === 'ERROR_REQUEST' && retry.count < retry.maxTry ) {
				verbose && console.log('retry previous request');
				return D.wait(Math.min(1 << retry.count, retry.maxDelay)).then(function(){
					retry.count++;
					params.retry = retry;
					impersonation && (params.impersonate = impersonation);
					return self.request(method, path, params);
				});
			}
			verbose && console.log('ERROR', e);//, req);
			throw e;
		});
	}

d

Property descriptor factory

ISC
Latest version published 2 months ago

Package Health Score

72 / 100
Full package analysis