Builds on top of #352, only the last commit is new.
This commit changes the retry() strategy: instead of sleeping a constant
3 seconds between attempts, each attempt sleeps twice as much as the previous
one (starting at 2 seconds). There is a cap of 5 attempts, so that the call
to retry can sleep() for at most 2+4+8+16+32 = 62 seconds.
Builds on top of #352, only the last commit is new.
This commit changes the retry() strategy: instead of sleeping a constant 3 seconds between attempts, each attempt sleeps twice as much as the previous one (starting at 2 seconds). There is a cap of 5 attempts, so that the call to retry can sleep() for at most 2+4+8+16+32 = 62 seconds.