-
Notifications
You must be signed in to change notification settings - Fork 145
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
Allow to use Retry-After header in asynchronous code #152
Comments
I've managed to get it to work by using My working proof of concept:
|
Thanks for this report. I think we should figure out how to support this use case with async for all decorators if we can. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow up to #124
In its current form, backoff doesn't allow to use Retry-After headers in asynchronous code.
It might be my lack of understanding or a problem with
aiohttp
, but I'm curious what your opinions are.I need the full
response
object to be able to extract Retry-After header out of it for the value, but I can't await it because it's not awaitable. I can awaitresponse.read()
in myfetch()
function, but then I can't pass anything that contains headers to my predicate and value functions.Is there any way to circumvent that and use backoff.runtime with Retry-After with
aiohttp
async code?The text was updated successfully, but these errors were encountered: