-
-
Notifications
You must be signed in to change notification settings - Fork 371
feat: add funding_source_max_retries env setting
#2404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2404 +/- ##
==========================================
- Coverage 59.98% 59.97% -0.01%
==========================================
Files 65 65
Lines 9433 9434 +1
==========================================
Hits 5658 5658
- Misses 3775 3776 +1 ☔ View full report in Codecov by Sentry. |
Good practice is to use exponential backoff - 1 second, 2 seconds, 4 seconds, etc. up to MAX_RETRIES So maybe replace: await asyncio.sleep(sleep_time)with await asyncio.sleep(2 ** retry_counter)and drop the In that case it would be nice to document this exponential behaviour in the |
True, but the server does not answer any requests until it initialises the funding source. Also, this PR is a response to #2403 that removes the retry altogether. |
We can use await asyncio.sleep(0.2 * (2 ** retry_counter))so the wait will be 0.2, 0.4, 0.8, 1.6 and 3.2 seconds (total 6.2 seconds) for |
Co-authored-by: Pavol Rusnak <[email protected]>
Co-authored-by: Pavol Rusnak <[email protected]>
Make the funding source retry count customisable.
Under some conditions a 30 sec retry is too long.