Commvault / cvpysdk

Developer SDK - Python
https://commvault.github.io/cvpysdk/
Apache License 2.0
54 stars 41 forks source link

Currently no Timeouts configured and no way to set a default timeout #132

Closed jammiemil closed 3 years ago

jammiemil commented 3 years ago

As per above there is currently not timeout configured when making requests of the API and no way to add a timeout as part of the Commcell object, so if the API does not respond for any reason a script may hang indefinitely until exited by the user. Ideally this would be configurable whilst creating your Commcell object with some sort of default set.

spakhare commented 3 years ago

Hi @jammiemil,

By default, we timeout API calls after 10mins. Can you please let us know if you have come across any case where we didn't timeout even after 10mins?

Thanks.

jammiemil commented 3 years ago

Hi @spakhare,

Thanks for responding. I had a look through the source and i couldn't see any reference to a timeout at all, but perhaps i missed it. However for our use case we are making regular calls to the API for pulling metrics out of the system to display in our monitoring system rather than an orchestration type use case so we were looking to timeout much sooner around the 5-10 second period. If there's at least a default timeout of 10mins then that's great but it would be useful to be able to override this when defining our api connections for different use cases.

spakhare commented 3 years ago

Hi @jammiemil,

Thanks for confirming your use case. As of now, we don't have support to set the timeout. I will check if we can get something.

Thanks