Skip to content

Commit

Permalink
keep option to override 'get_default_timeout' on 'ServerAPI' class
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Sep 15, 2023
1 parent 58e2135 commit 539f3de
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ayon_api/server_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,18 @@ def set_cert(self, cert):
ssl_verify = property(get_ssl_verify, set_ssl_verify)
cert = property(get_cert, set_cert)

@classmethod
def get_default_timeout(cls):
"""Default value for requests timeout.
Utils function 'get_default_timeout' is used by default.
Returns:
float: Timeout value in seconds.
"""

return get_default_timeout()

@classmethod
def get_default_max_retries(cls):
"""Default value for requests max retries.
Expand Down Expand Up @@ -532,7 +544,7 @@ def set_timeout(self, timeout):
"""

if timeout is None:
timeout = get_default_timeout()
timeout = self.get_default_timeout()
self._timeout = float(timeout)

def get_max_retries(self):
Expand Down

0 comments on commit 539f3de

Please sign in to comment.