trezor / blockbook

:blue_book: Trezor address/account balance backend
https://trezor.io
GNU Affero General Public License v3.0
647 stars 644 forks source link

Refactor retry logic in Coingecko API #1014

Closed romanornr closed 5 months ago

romanornr commented 8 months ago

Refacto retry logic in Coingecko API

https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

Yes, I've seen the message Normally we do not accept PRs that modify common code But I think it's still worth considering it or modifying what I have.

Unfortunately, I did import math, not sure maybe you guys have a better way

martinboehm commented 8 months ago

@romanornr Hi, thank you for your contribution. However, I am against the change as I think it would slow down the download of the rates. If Blockbook is competing against others on the same IP, it will not help that it voluntarily slows down the download.