You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I have a function that sends a HTTP request with a token that is to be refreshed every N minutes that is not under my control. So I wrap the token fetching request into a separate closure that can be called whenever needed.
def token_fetcher():
token = None
def _fetcher(renew):
nonlocal token
if token is None or renew:
token = do_something_to_fetch_the_token()
return token
return _fetcher
Suppose I have a function that sends a HTTP request with a token that is to be refreshed every N minutes that is not under my control. So I wrap the token fetching request into a separate closure that can be called whenever needed.
and my actual function doing HTTP request
So is it possible to make backoff to flip
renew
intoTrue
if backoff happens? (second trial onwards)The text was updated successfully, but these errors were encountered: