Skip to content

Commit 3b2f6ab

Browse files
committed
Simplified tenacity code and fixed mistake with tenacity retry_if_exception.
1 parent f5f7724 commit 3b2f6ab

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Diff for: packages/python/chart-studio/chart_studio/api/v2/utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ def should_retry(exception):
130130

131131

132132
@tenacity.retry(
133-
wait=tenacity.wait.wait_exponential(multiplier=1000, max=16000),
134-
stop=tenacity.stop.stop_after_delay(180000),
135-
retry=tenacity.retry.retry_if_exception(should_retry),
133+
wait=tenacity.wait_exponential(multiplier=1000, max=16000),
134+
stop=tenacity.stop_after_delay(180000),
135+
retry=tenacity.retry_if_exception(should_retry),
136136
)
137137
def request(method, url, **kwargs):
138138
"""

Diff for: packages/python/plotly/plotly/io/_orca.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1452,8 +1452,7 @@ def ensure_server():
14521452

14531453

14541454
@tenacity.retry(
1455-
wait=tenacity.wait.wait_random(min=5, max=10),
1456-
stop=tenacity.stop.stop_after_delay(60000),
1455+
wait=tenacity.wait_random(min=5, max=10), stop=tenacity.stop_after_delay(60000),
14571456
)
14581457
def request_image_with_retrying(**kwargs):
14591458
"""

0 commit comments

Comments
 (0)