Skip to content

EToreo/retry-as-promised

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

retry-as-promised

$ npm install --save retry-as-promised

Retry a failed promise

var retry = require('retry-as-promised');

// Will call the until max retries or the promise is resolved.
return retry(function () {
  return promise;
}, {
  max: 3, // maximum amount of tries, default: 1
  timeout: 10000 // throw if no response or error within milisecnd timeout, default: undefined
});

Tested with

  • Bluebird

About

Retry a failed promise

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%