near / near-indexer-for-explorer

Watch NEAR network and store all the data from NEAR blockchain to PostgreSQL database
https://near-indexers.io/docs/projects/near-indexer-for-explorer
GNU General Public License v3.0
124 stars 56 forks source link

refactor: Retry or panic macros to replace code duplication and add panic after N attempts #168

Closed khorolets closed 2 years ago

khorolets commented 2 years ago

In this PR we introduce await_retry_or_panic! macros to replace or copy-pasted retry logic we had previously. Also, we're changing the logic and we want to panic after ~5 min of retries to let the maintainers know that something is wrong and we need to do something about it.