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

Add timeout options and some maintenance stuff. #28

Merged
merged 1 commit into from
Sep 29, 2016
Merged

Add timeout options and some maintenance stuff. #28

merged 1 commit into from
Sep 29, 2016

Conversation

SpacePossum
Copy link
Contributor

@SpacePossum SpacePossum commented Sep 20, 2016

I use the service on places where internet is not always very good (on location at some fashion event for example). In order to make sure (most) of the messages go out I do the sending by using a job queue. It would however be useful to be able to tweak the timeouts as passed by the lib to the curllib it uses to allow for even longer timeouts.

I've added some comments to explain why I changed some other details. Let me know what you think :)

- 7.0
- 7.1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

prep. for upcoming 7.1 release

</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

allows for PHPUnit to generate a coverage report (and easy PHPUnit runs from the commandline, i.e. just phpunit)

*/
public function __construct($endpoint)
public function __construct($endpoint, $timeout = 10, $connectionTimeout = 2)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added timeout options without BC breaks

if (!file_exists($caFile)) {
throw new Exceptions\HttpException('Unable to find CA-bundle file: ' . $caFile);
throw new Exceptions\HttpException(sprintf('Unable to find CA-bundle file "%s".', __DIR__ . '/../ca-bundle.crt'));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if the file does not exists realpath returns false so printing the var. $caFile did not help

@SpacePossum SpacePossum changed the title Add timeout options and so maintenance stuff. Add timeout options and some maintenance stuff. Sep 22, 2016
@SpacePossum
Copy link
Contributor Author

btw. fixes #19 as well ;)

@SpacePossum
Copy link
Contributor Author

@samwierema
Copy link
Contributor

Thanks for the pull request @SpacePossum! This will be released as version 1.6.0.

@SpacePossum SpacePossum deleted the master_add_timeout_options branch September 29, 2016 08:54
@SpacePossum
Copy link
Contributor Author

thank you @samwierema :) 👍

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