Skip to content
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

feat: support retrying #16

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Conversation

ShamrockLee
Copy link

@ShamrockLee ShamrockLee commented Aug 13, 2024

Description

This pull request adds a parameter retries to methods Dials.list and Dials.list_all, backed by urllib3.util.Retry and requests.adapters.HTTPAdapter.

Long downloads are prone to network issues, which can be mitigated by adding retrying functionality. This PR forwards the max_retries parameter of HTTPAdapter as retries to Dials.list and Dials.list_all and provides the retrying functionality without additional dependencies.

Screenshot_20240813_110549

Progress

I'm testing the functionality by downloading 1D histograms of four MEs from /JetMET0/Run2024D-PromptReco-v1/DQMIO.

How do I add and run the tests inside the source tree? Do you think I should also update the documentation?

Update: I now see the instructions in the README.md.

Add a parameter `retries` to methods `list` and `list_all`,
backed by `urllib3.util.Retry` and `requests.adapters.HTTPAdapter`.
@gabrielmscampos
Copy link
Member

gabrielmscampos commented Aug 16, 2024

If you are part of the cms-dqm-coreTeam e-group you can find the SECRET_KEY mentioned in the documentation from any api-client application in CERN's Applications Portal. DM me on Mattermost if you are not a member, so I can create an api client id/secret for you.

@ShamrockLee
Copy link
Author

@gabrielmscampos Thank you for helping out! I just sent you a direct message on Mattermost a minute ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants