devinus/poolboy — pull request #22 by ddosia (2013-02-11 12:15:32+00:00)
Title: Add back-off ability.

### Ratio
If worker can not not be spawned for some reason(database is offline) poolboy will die. This pull request adds new option to spawn worker:
```
{backoff, {Mod, Fun, Args}}
```
which is intended to increase time-outs between worker restarts if something going wrong.

### Main idea
instead of worker spawn, we spawn a wrapper, which sleeps for some time, awakes, spawn worker and delegate this worker to poolboy.

If backoff option is not specified then worker will be spawned as usual (i.e. synchronous).

### Tests
if you try to run test with backoff enabled option, some of them will fail (like those, who kill worker and immediately try to count them with `get_avail_workers` as spawn still in progress). Perhaps some of such calls should be re-designed. Thus with disabled backoff all tests are fine.