nodejitsu/forever-monitor — pull request #15 by joshthecoder (2012-12-17 01:08:23+00:00)
Title: Implement restart attempt backoffs.

This provides changes to the monitor needed to implement restart attempt delays in forever.
See issue [#350](https://github.com/nodejitsu/forever/issues/350) for details on this feature request.

I have expanded the options to include: delay, delayAlgorithm, and delayMax.
These are used to control the amount of delay between trying to restart a script.
I will send a PR for forever CLI to expose these new options.

The built-in algorithms so far are: incremental, exponential, and fibonacci.
These are implemented in backoff.js. The design allows for dropping in your own
algorithms by just passing a function for the 'delayAlgorithm' option.

Right now I use the "times" variable to compute the delays. The issue with that is it doesn't get
reset back to zero after a successful launch of the script. I am not sure if the right direction is to
introduce a new variable or fix "times" to reset to zero.