Skip to content

Commit 52ed285

Browse files
committed
Allow retries of any method
1 parent f49d83d commit 52ed285

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

morango/sync/syncsession.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ def __init__(
155155
self.session = SessionWrapper()
156156
# sleep for {backoff factor} * (2 ^ ({number of total retries} - 1)) between requests
157157
# with 7 retry attempts, sleep escalation becomes (0.6s, 1.2s, ..., 38.4s)
158-
retry = Retry(total=retries, backoff_factor=backoff_factor)
158+
retry = Retry(
159+
total=retries,
160+
backoff_factor=backoff_factor,
161+
allowed_methods=None, # allow any method
162+
)
159163
adapter = HTTPAdapter(max_retries=retry)
160164
self.session.mount("http://", adapter)
161165
self.session.mount("https://", adapter)

0 commit comments

Comments
 (0)