Skip to content

Commit

Permalink
inline retry strat
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Molinaro authored Apr 7, 2022
1 parent 6ba4226 commit af4f8e9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions phabricator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,11 @@ def __init__(self, api, interface=None, endpoint=None, method=None, nested=False
self.method = method
self.nested = nested
self.session = requests.Session()
retry_strategy = Retry(
adapter = HTTPAdapter(max_retries=Retry(
total=3,
connect=3,
method_whitelist=["HEAD", "GET", "POST", "PATCH", "PUT", "OPTIONS"]
)
adapter = HTTPAdapter(max_retries=retry_strategy)
allowed_methods=["HEAD", "GET", "POST", "PATCH", "PUT", "OPTIONS"]
))
self.session.mount("https://", adapter)
self.session.mount("http://", adapter)

Expand Down

0 comments on commit af4f8e9

Please sign in to comment.