mailjet / mailjet-apiv3-php

[API v3] Mailjet PHP Wrapper
http://dev.mailjet.com
MIT License
267 stars 87 forks source link

Long timeouts #91

Closed andyg5000 closed 7 years ago

andyg5000 commented 7 years ago

The api went down today and we're using this SDK. The pages that make calls using it were not loading because the Guzzle client objects do not have a timeout set. It would be nice to specify a timeout when invoking methods as well as have a ping method that allows you to tell if the api is returning a response.

aleksvaganoff commented 7 years ago

I had the same problem today. Please, provide 'timeout' parameter for sending emails

Zhivko-Mailjet commented 7 years ago

@andyg5000 @aleksvaganoff Yesterday we experienced temporary problems, please accept our apologies. You can find details on our status page: https://mailjet.statuspage.io/

We will definetely look into this matter and work on specifying a timeout for the API queries anytime soon. Thanks for reporting this!

andyg5000 commented 7 years ago

Sounds good. Here's how we addressed it in our wrapper class

https://github.com/blueoakinteractive/mailjet_simple/blob/master/includes/mailjet_simple.api.inc#L38-L68

Thanks!

latanasov commented 7 years ago

Hi @andyg5000 and @aleksvaganoff , I just merged https://github.com/mailjet/mailjet-apiv3-php/pull/92 , which will allow you to set the timeout + other guzzle request options, through the mailjet client.

You are now able to do thing like $client->setTimeout(3); .