Skip to content

Commit 76e7516

Browse files
authored
Merge pull request #7442 from readthedocs/revert-retry
Revert "Don't retry on POST"
2 parents 5421dcb + 2b67497 commit 76e7516

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

readthedocs/api/v2/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ def setup_api():
3232
else:
3333
adapter_class = TimeoutHTTPAdapter
3434

35-
# Define a retry mechanism trying to attempt to not fail in the first
36-
# error. Builders hit this issue frequently because the webs are high loaded
35+
# Define a retry mechanism trying to attempt to not fail in the first error.
36+
# Builders hit this issue frequently because the webs are high loaded
37+
# (even on non-idempotent methods, sadly).
3738
retry = Retry(
3839
total=3,
3940
read=3,
4041
connect=3,
4142
status=3,
4243
backoff_factor=0.5, # 0.5, 1, 2 seconds
43-
method_whitelist=('GET', 'PUT', 'PATCH'),
44-
status_forcelist=(408, 413, 429, 500, 502, 503),
44+
method_whitelist=('GET', 'PUT', 'PATCH', 'POST'),
45+
status_forcelist=(408, 413, 429, 500, 502, 503, 504),
4546
)
4647

4748
session.mount(

0 commit comments

Comments
 (0)