-
Notifications
You must be signed in to change notification settings - Fork 11
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
RetryHandlerOption incorrect max_delay default logic #409
Comments
Hi @pmcgaley, thank you for reaching out. I agree that the internal naming of the variable within the class may be confusing, but the parameter name exposed via the constructor should communicate this. You can change the default options = {}
options[RetryHandlerOption.get_key()] = new RetryHandlerOption(delay: 5)
http_client = GraphClientFactory.create_with_default_middleware(options=options)
request_adapter = GraphRequestAdapter(auth_provider, http_client)
client = GraphServiceClient(request_adapter=request_adapter) This can also be done per request by passing the same options dictionary to the request configuration parameters in the GraphServiceClient's get()/post()... methods for each API path. Please let me know if you need any further assistance. |
Hi. I don't think that's correct. The It stops retrying if the specified/computed retry time exceeds So basically the If I want it to retry for up to 180 seconds (which is theoretically the default) I actually have to specify Hope that makes sense. |
There seems to be some confusion in this code between
delay
(defaults to 3 seconds) andmax_delay
(should default to 180 seconds)kiota-python/packages/http/httpx/kiota_http/middleware/options/retry_handler_option.py
Line 50 in ad21998
I'm hitting this using
GraphServiceClient
frommsgraph
. It's defaulting tomax_delay
of 3 seconds, resulting in limited or no retries.Not sure if the intention is that you specify the max delay as
delay
in the constructor, or whether there should bedelay
andmax_delay
settings, but pretty sure it's not as intended currently.The text was updated successfully, but these errors were encountered: