-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add timeout options and some maintenance stuff. #28
Conversation
- 7.0 | ||
- 7.1 |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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')); |
There was a problem hiding this comment.
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
btw. fixes #19 as well ;) |
TODO |
Thanks for the pull request @SpacePossum! This will be released as version |
thank you @samwierema :) 👍 |
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 :)