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: refactor client for parallel usage #8

Merged
merged 5 commits into from
Dec 3, 2024
Merged

Conversation

polnico
Copy link
Collaborator

@polnico polnico commented Dec 3, 2024

To make sure that concurrent calls for get and request can be made, it is easier to move some of the logic from the class level to the function level.

For example, this will ensure that the data retrieved after a request is always associated to this specific request

To make sure that concurrent calls for get and request can be made, it
is easier to move some of the logic from the class level to the function
level.

For example, this will ensure that the data retrieved after a request is always
associated to this specific request

Signed-off-by: polnico <pol.nicolai@gmail.com>
Signed-off-by: polnico <pol.nicolai@gmail.com>
The status code value is not part any longer of the request object,
which means it should not be checked after in tests. However we can
still check content pf response + other errors.

Finally some helper functions were removed, so the associated tests
were also removed.

Signed-off-by: polnico <pol.nicolai@gmail.com>
Signed-off-by: polnico <pol.nicolai@gmail.com>
Instead of creating a new one for each request, reuse the existing one.
This also works for  //ism as the requests lib already uses connection
pooling

Signed-off-by: polnico <pol.nicolai@gmail.com>
@deperonnier deperonnier self-requested a review December 3, 2024 18:22
Copy link

@deperonnier deperonnier left a comment

Choose a reason for hiding this comment

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

looks good, we should have much better concurrent requests performance with this

@polnico polnico merged commit 054bbbf into develop Dec 3, 2024
8 checks passed
@polnico polnico deleted the refactor_client branch December 3, 2024 20:56
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