0.1.0 • Published 11 years ago

ee-retry v0.1.0

Weekly downloads
5
License
-
Repository
github
Last release
11 years ago

ee-retry

Repeat some action in an exponential increased capped interval

installation

npm install ee-retry

build status

Build Status

usage

var Retry = require( "ee-retry" );

var try = new Retry( {
   	  min: 100 // 0.1 sec
	, max: 60000 // 1 minute
} );


try.on( "try", function( stop ){
	// execute somthing
	var connection = new Connection();
	connection.on( "connect", function(){
		// call the finished function
		stop();
	} );
} );