canonical / craft-application

The basis for *craft applications
https://canonical-craft-application.readthedocs-hosted.com/en/latest
GNU Lesser General Public License v3.0
5 stars 6 forks source link

feat: exponential backoff for launchpad retries #355

Closed tigarmo closed 3 weeks ago

tigarmo commented 4 weeks ago

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.