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

Timeout #84

Closed
manavo opened this issue May 23, 2016 · 2 comments
Closed

Timeout #84

manavo opened this issue May 23, 2016 · 2 comments

Comments

@manavo
Copy link

manavo commented May 23, 2016

If I get a chance I'll try and make a PR, but it would be good if a timeout could be added to the Guzzle client. At the moment there is no timeout, which causes issues in some cases!

@tbarn
Copy link
Contributor

tbarn commented Aug 4, 2016

Hey @manavo!

For your use case, is it helpful to use the Guzzle retry plugin?

use KeenIO\Client\KeenIOClient;

$client = KeenIOClient::factory([
    'projectId' => $projectId,
    'writeKey'  => $writeKey,
    'readKey'   => $readKey
]);

// Use a static factory method to get a backoff plugin using the exponential backoff strategy
$backoffPlugin = BackoffPlugin::getExponentialBackoff();

// Add the backoff plugin to the client object
$client->addSubscriber($backoffPlugin);

@josephwegner
Copy link
Contributor

Closing for now, as this should be available by tapping in to Guzzle directly. Thanks @tbarn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants