renew

0.0.1 • Public • Published

Renew

Execute an asyncronous function repeatedly until it completes or the max number of attempts are reached

Installation

npm -S install renew

Usage

var renew = require('renew')
var inspect = require('eyespect').inspector();
var params = ['foo', 'params']
var command = function (data, cb) {
   inspect(data, 'command called with params')
   setTimeout(function () {
     cb(null, 'foo result')
   })
}
 
var data = {
  command: command,
  params: params,
  maxAttempts: 4
}
renew(data, function (err, reply) {
 
})
 

Test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    6

Package Sidebar

Install

npm i renew

Weekly Downloads

6

Version

0.0.1

License

BSD

Last publish

Collaborators

  • clewfirst