Skip to content

Commit

Permalink
reverted to using retrying in chart-studio due to test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsmdy committed Dec 8, 2020
1 parent 1b700d5 commit cd587f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .circleci/create_conda_optional_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ ! -d $HOME/miniconda/envs/circle_optional ]; then
# Create environment
# PYTHON_VERSION=2.7 or 3.5
$HOME/miniconda/bin/conda create -n circle_optional --yes python=$PYTHON_VERSION \
requests nbformat six tenacity psutil pandas decorator pytest mock nose poppler xarray scikit-image ipython jupyter ipykernel ipywidgets statsmodels
requests nbformat six retrying tenacity psutil pandas decorator pytest mock nose poppler xarray scikit-image ipython jupyter ipykernel ipywidgets statsmodels

# Install orca into environment
$HOME/miniconda/bin/conda install --yes -n circle_optional -c plotly plotly-orca==1.3.1
Expand Down
11 changes: 6 additions & 5 deletions packages/python/chart-studio/chart_studio/api/v2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import requests
import json as _json
from requests.exceptions import RequestException
import tenacity
from retrying import retry

import _plotly_utils.exceptions
from chart_studio import config, exceptions
Expand Down Expand Up @@ -129,10 +129,11 @@ def should_retry(exception):
return False


@tenacity.retry(
wait=tenacity.wait_exponential(multiplier=1000, max=16000),
stop=tenacity.stop_after_delay(180000),
retry=tenacity.retry_if_exception(should_retry),
@retry(
wait_exponential_multiplier=1000,
wait_exponential_max=16000,
stop_max_delay=180000,
retry_on_exception=should_retry,
)
def request(method, url, **kwargs):
"""
Expand Down
4 changes: 2 additions & 2 deletions packages/python/chart-studio/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ deps=
requests==2.12.4
six==1.10.0
pytz==2016.10
tenacity==6.2.0
retrying==1.3.3
pytest==3.5.1
backports.tempfile==1.0
pandas==0.23.2
numpy==1.14.3
; numpy==1.14.3
ipywidgets==7.2.0
matplotlib==2.2.3
--editable=file:///{toxinidir}/../plotly
Expand Down

0 comments on commit cd587f3

Please sign in to comment.