8000 Remove tenacity dependency by ndrezn · Pull Request #4831 · plotly/plotly.py · GitHub
[go: up one dir, main page]

Skip to content

Remove tenacity dependency #4831

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 4 commits into from
Oct 24, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Apply formatting 💄
  • Loading branch information
ndrezn committed Oct 24, 2024
commit 7b6cfe8216eecd20230f6df92ada793251ae0a66
9 changes: 6 additions & 3 deletions packages/python/plotly/plotly/io/_orca.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,16 @@ def wrapper(*args, **kwargs):
except Exception as e:
elapsed_time = time.time() - start_time
if elapsed_time * 1000 >= max_delay:
raise TimeoutError(f"Retry limit of {max_delay} milliseconds reached.") from e

raise TimeoutError(
f"Retry limit of {max_delay} milliseconds reached."
) from e

wait_time = random.uniform(min_wait, max_wait)
print(f"Retrying in {wait_time:.2f} seconds due to {e}...")
time.sleep(wait_time)

return wrapper

return decorator


Expand Down
0