Skip to content
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

Unable to override request timeout #55

Open
abhishek-query opened this issue Dec 3, 2021 · 2 comments
Open

Unable to override request timeout #55

abhishek-query opened this issue Dec 3, 2021 · 2 comments

Comments

@abhishek-query
Copy link

I didn't see an option to override default request timeout that is set to 300 sec. As a SDK consumer, I needed a way to change the default value while initialising the client or during search requests.

self.default_request_kwargs = {
'timeout': 300,
}

@shamusfield-expel
Copy link
Contributor

Hey there! I'll look into that. In the meantime, that property should be inherited/settable by all children, snippet:

    xclient = WorkbenchClient(url, token=token)
    print(xclient.default_request_kwargs)
    xclient.default_request_kwargs = {
        'timeout': 900
    }
    
    things = xclient.things.search()....

Request args should be updated from the default_request_kwargs upon each request, so you can change those values at will. Let me know if that works for you or not.

@abhishek-query
Copy link
Author

Thanks for the input. I'm able to update the "timeout" property as per mentioned steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants