Skip to content

How does execute_query_with_incremental_retry actually work? #939

Open
@npetzall-vcc

Description

@npetzall-vcc

https://github.com/vgrem/Office365-REST-Python-Client/blob/9584c62c9c4237107fb5ab2dc11629b8f1184b57/office365/sharepoint/client_context.py#L235

It calls
https://github.com/vgrem/Office365-REST-Python-Client/blob/9584c62c9c4237107fb5ab2dc11629b8f1184b57/office365/runtime/client_runtime_context.py#L43

Which iterates with a sleep and a sleep that uses a method argument, so I don't see how that sleep could be dynamic.

Python isn't my primary language, but I've made the assumption that the input argument, which is an int is passed by value and is not a mutable object, since it's an int.

In the sharepoint/client_context the settings object is local to the method, the _try_process_if_failed is an internal method that only modifies the settings object, since you only call execute_query_with_incremental_retry once, and it only calls execute_query_retry once. I don't understand how the modification of the settings can have any effect.

I would have expected a sleep instead inside of _try_process_if_failed, to impact the delay of the retry iteration in client_runtime_context.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions