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

CTOOLS-348: allow timeout and rate limit retry configuration #37

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

cg-finbourne
Copy link
Contributor

Pull Request Checklist

Description of the PR

Describe the code changes for the reviewers, explain the solution you have provided and how it fixes the issue

@cg-finbourne cg-finbourne force-pushed the feature/CTOOLS-348 branch 6 times, most recently from 9c00f2b to 7c5dda4 Compare September 23, 2024 08:27
api.api_client.close()

if async_req:
result = result.get(timeout=60)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the timeout for? Is this simulating the async request?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the timeout is just so that the test won't hang forever. If the task hasn't finished by the timeout then an exception will be raised. I've put it to a bigger timeout that it needs to allow for debugging through the test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for context when async_req is set to True, the method call is run on a background queue to simulate async behaviour
image. This happens in both the sync and the async api_client
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool thanks, that makes sense

@cg-finbourne cg-finbourne merged commit de732a0 into main Sep 24, 2024
1 check passed
@cg-finbourne cg-finbourne deleted the feature/CTOOLS-348 branch September 24, 2024 10:20
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