Skip to content

samuelg/node-backoff-func

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

A simple functional exponential backoff function invoker.

Once configured, provides a function that will eventually call the provided function using an exponential backoff algorithm.

Usage

var backoff = require('backoff-func').create({
  delay: 10, // default value
  maxDelay: 10000, // default value
  maxRetries: 10, // default value
});

var scheduled = backoff(function() {
  // your code here
});

if (!scheduled) {
  // maxRetries reached
}

License

MIT

Copyright (c) 2015 Samuel Fortier-Galarneau [email protected]

About

Eventually call a function based on an exponential backoff

Resources

License

Stars

Watchers

Forks

Packages

No packages published