Skip to content

Commit

Permalink
Merge pull request #283 from SubstraFoundation/linear-backoff
Browse files Browse the repository at this point in the history
Change exponential to linear backoff as we use huge nb of retry
  • Loading branch information
Kelvin-M authored Jul 8, 2020
2 parents adb43c9 + f3844fc commit 0bc0194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/substrapp/ledger_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def _wrapper(*args, **kwargs):
_nbtries -= 1
if not nbtries:
raise
_delay *= _backoff
_delay += _backoff
time.sleep(_delay)
logger.warning(f'Function {fn.__name__} failed ({type(e)}): {e} retrying in {_delay}s')

Expand Down

0 comments on commit 0bc0194

Please sign in to comment.