Skip to content

Revert "Don't retry on POST" #7442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions readthedocs/api/v2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ def setup_api():
else:
adapter_class = TimeoutHTTPAdapter

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

session.mount(
Expand Down