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

Move default timeouts from request to client configuration. #9

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

claude-vessaz-hs
Copy link
Contributor

The current implementation does not allow the configuration of custom timeouts since they are set to 20s/10s for each request. Passing in a custom client with specified timeouts does not change the timeout since they are overridden. In some scenarios, it is desirable to have shorter timeouts to avoid stalling the processing of requests/jobs.

This change should not modify the library's default behaviour but moving the timeouts into the client configuration allows the customization of the values by providing a different instance of the Guzzle client.

The current implementation does not allow the configuration of custom timeouts since they are set to 20s/10s for each request. Passing in a custom client with specified timeouts does not change the timeout since they are overridden. In some scenarios, it is desirable to have shorter timeouts to avoid stalling the processing of requests/jobs.

This change should not modify the library's default behaviour but move the timeouts into the client configuration to allow the customization of the values by providing a different instance of the Guzzle client.

Signed-off-by: Claude Vessaz <claude.vessaz@hootsuite.com>
@LKaemmerling
Copy link
Member

Good catch! Thank you @claude-vessaz-hs

@LKaemmerling LKaemmerling merged commit 0129c78 into PromPHP:master Apr 11, 2022
@claude-vessaz-hs claude-vessaz-hs deleted the configurable-timeouts branch April 11, 2022 19:53
@claude-vessaz-hs claude-vessaz-hs restored the configurable-timeouts branch April 11, 2022 19:55
@claude-vessaz-hs claude-vessaz-hs deleted the configurable-timeouts branch April 11, 2022 21:09
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.

None yet

2 participants