mirror of
https://github.com/clearml/clearml
synced 2025-04-10 07:26:03 +00:00
Support Retry.DEFAULT_BACKOFF_MAX
in a backwards-compatible way
This commit is contained in:
parent
a794d0d8ab
commit
1980f1c56b
@ -129,7 +129,10 @@ def get_http_session_with_retry(
|
||||
session.trust_env = False
|
||||
|
||||
if backoff_max is not None:
|
||||
Retry.DEFAULT_BACKOFF_MAX = backoff_max
|
||||
if "BACKOFF_MAX" in vars(Retry):
|
||||
Retry.BACKOFF_MAX = backoff_max
|
||||
else:
|
||||
Retry.DEFAULT_BACKOFF_MAX = backoff_max
|
||||
|
||||
retry = Retry(
|
||||
total=total, connect=connect, read=read, redirect=redirect, status=status,
|
||||
|
Loading…
Reference in New Issue
Block a user