Attempt will re-run your attempted function if it throws an error or if it
calls back with a non-falsey first argument (following the first-arg-is-an-error
standard Node.js convention). The function call looks like this:

attempt([options], tryFunc, [callback])

tryFunc is called with one argument: attempts. It is the number of times the
tryFunc has been run before.

Default: 1. The factor by which the interval should be multiplied per
attempt. If set to 2 with an interval of 5000, the first retry will execute
after 5 seconds, the second after 10, the third after 20, and so on.

This allows an exponential back-off scheme. For a smaller gap between retries,
floats like 1.2 can be used to grow the interval at a slower rate.

The second argument, if it exists, is a callback function that will need to be
called in order for the next attempt to continue. This is useful if you have
to do something asynchronous to fix the error.

Default: 0. Increase the wait interval by a random factor. Generally, this
should be a number between 0 (no randomness) and 1 (wait time could double).
For example, if .5 is used, the interval could be anywhere between 100% and
150% of its original calculated time.