{"action":"created","comment":{"url":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/comments/91274871","pull_request_review_id":11782004,"id":91274871,"diff_hunk":"@@ -248,4 +266,37 @@ public function setExtraHeader($key, $value)\n     {\n         $this->headers[$key] = $value;\n     }\n+\n+    /**\n+     * @param $host\n+     */\n+    public function addFailingHost($host)\n+    {\n+        if (! in_array($host, static::$failingHosts)) {\n+            static::$failingHosts[] = $host;\n+        }\n+    }\n+\n+    /**\n+     * The Client will call this when an attempt to reach a given host times out.\n+     * If the host is first either in the readHosts or the the writeHosts, we\n+     * rotate the array to ensure the next API call will be directly made with a working\n+     * host. This mainly ensures we don't add the equivalent of the connection timeout value to each\n+     * request to the API.\n+     *\n+     * @param string $host The host that was unavailable.\n+     */\n+    public function rotateHosts($host)","path":"src/AlgoliaSearch/ClientContext.php","position":74,"original_position":74,"commit_id":"6c6215690ce4b3c439d75d0f2ab3a5c15e36bcf3","original_commit_id":"6c6215690ce4b3c439d75d0f2ab3a5c15e36bcf3","user":{"login":"rayrutjes","id":5570853,"avatar_url":"https://avatars.githubusercontent.com/u/5570853?v=3","gravatar_id":"","url":"https://api.github.com/users/rayrutjes","html_url":"https://github.com/rayrutjes","followers_url":"https://api.github.com/users/rayrutjes/followers","following_url":"https://api.github.com/users/rayrutjes/following{/other_user}","gists_url":"https://api.github.com/users/rayrutjes/gists{/gist_id}","starred_url":"https://api.github.com/users/rayrutjes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayrutjes/subscriptions","organizations_url":"https://api.github.com/users/rayrutjes/orgs","repos_url":"https://api.github.com/users/rayrutjes/repos","events_url":"https://api.github.com/users/rayrutjes/events{/privacy}","received_events_url":"https://api.github.com/users/rayrutjes/received_events","type":"User","site_admin":false},"body":"Remove the `$host` parameter as we will rely on the static list of failed hosts.","created_at":"2016-12-07T11:31:27Z","updated_at":"2016-12-07T11:31:27Z","html_url":"https://github.com/algolia/algoliasearch-client-php/pull/187#discussion_r91274871","pull_request_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/187","_links":{"self":{"href":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/comments/91274871"},"html":{"href":"https://github.com/algolia/algoliasearch-client-php/pull/187#discussion_r91274871"},"pull_request":{"href":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/187"}}},"pull_request":{"url":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/187","id":96902710,"html_url":"https://github.com/algolia/algoliasearch-client-php/pull/187","diff_url":"https://github.com/algolia/algoliasearch-client-php/pull/187.diff","patch_url":"https://github.com/algolia/algoliasearch-client-php/pull/187.patch","issue_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues/187","number":187,"state":"open","locked":false,"title":"Statefull retry strategy with multi client support (2)","user":{"login":"maxiloc","id":1689007,"avatar_url":"https://avatars.githubusercontent.com/u/1689007?v=3","gravatar_id":"","url":"https://api.github.com/users/maxiloc","html_url":"https://github.com/maxiloc","followers_url":"https://api.github.com/users/maxiloc/followers","following_url":"https://api.github.com/users/maxiloc/following{/other_user}","gists_url":"https://api.github.com/users/maxiloc/gists{/gist_id}","starred_url":"https://api.github.com/users/maxiloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxiloc/subscriptions","organizations_url":"https://api.github.com/users/maxiloc/orgs","repos_url":"https://api.github.com/users/maxiloc/repos","events_url":"https://api.github.com/users/maxiloc/events{/privacy}","received_events_url":"https://api.github.com/users/maxiloc/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-07T11:08:16Z","updated_at":"2016-12-07T11:37:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61e1bbe3118fd262c5be0e3954852283d1f44be7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/187/commits","review_comments_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/187/comments","review_comment_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues/187/comments","statuses_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/statuses/6c6215690ce4b3c439d75d0f2ab3a5c15e36bcf3","head":{"label":"algolia:statefull-retry-strategy-2","ref":"statefull-retry-strategy-2","sha":"6c6215690ce4b3c439d75d0f2ab3a5c15e36bcf3","user":{"login":"algolia","id":2034458,"avatar_url":"https://avatars.githubusercontent.com/u/2034458?v=3","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"repo":{"id":10172371,"name":"algoliasearch-client-php","full_name":"algolia/algoliasearch-client-php","owner":{"login":"algolia","id":2034458,"avatar_url":"https://avatars.githubusercontent.com/u/2034458?v=3","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/algolia/algoliasearch-client-php","description":"Algolia Search API Client for PHP","fork":false,"url":"https://api.github.com/repos/algolia/algoliasearch-client-php","forks_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/forks","keys_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/teams","hooks_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/hooks","issue_events_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues/events{/number}","events_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/events","assignees_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/assignees{/user}","branches_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/branches{/branch}","tags_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/tags","blobs_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/statuses/{sha}","languages_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/languages","stargazers_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/stargazers","contributors_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/contributors","subscribers_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/subscribers","subscription_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/subscription","commits_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/contents/{+path}","compare_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/merges","archive_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/downloads","issues_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues{/number}","pulls_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls{/number}","milestones_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/milestones{/number}","notifications_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/labels{/name}","releases_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/releases{/id}","deployments_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/deployments","created_at":"2013-05-20T12:37:37Z","updated_at":"2016-12-06T07:55:32Z","pushed_at":"2016-12-07T11:08:16Z","git_url":"git://github.com/algolia/algoliasearch-client-php.git","ssh_url":"git@github.com:algolia/algoliasearch-client-php.git","clone_url":"https://github.com/algolia/algoliasearch-client-php.git","svn_url":"https://github.com/algolia/algoliasearch-client-php","homepage":null,"size":1619,"stargazers_count":127,"watchers_count":127,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":15,"forks":49,"open_issues":15,"watchers":127,"default_branch":"master"}},"base":{"label":"algolia:master","ref":"master","sha":"4ba75b2ab6f90978de5b3aaac8cd54c0ddbdb39b","user":{"login":"algolia","id":2034458,"avatar_url":"https://avatars.githubusercontent.com/u/2034458?v=3","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"repo":{"id":10172371,"name":"algoliasearch-client-php","full_name":"algolia/algoliasearch-client-php","owner":{"login":"algolia","id":2034458,"avatar_url":"https://avatars.githubusercontent.com/u/2034458?v=3","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/algolia/algoliasearch-client-php","description":"Algolia Search API Client for PHP","fork":false,"url":"https://api.github.com/repos/algolia/algoliasearch-client-php","forks_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/forks","keys_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/teams","hooks_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/hooks","issue_events_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues/events{/number}","events_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/events","assignees_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/assignees{/user}","branches_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/branches{/branch}","tags_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/tags","blobs_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/statuses/{sha}","languages_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/languages","stargazers_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/stargazers","contributors_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/contributors","subscribers_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/subscribers","subscription_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/subscription","commits_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/contents/{+path}","compare_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/merges","archive_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/downloads","issues_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues{/number}","pulls_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls{/number}","milestones_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/milestones{/number}","notifications_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/labels{/name}","releases_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/releases{/id}","deployments_url":"https://api.github.com/repos/algolia/algoliasearch-client-php/deployments","created_at":"2013-05-20T12:37:37Z","updated_at":"2016-12-06T07:55:32Z","pushed_at":"2016-12-07T11:08:16Z","git_url":"git://github.com/algolia/algoliasearch-client-php.git","ssh_url":"git@github.com:algolia/algoliasearch-client-php.git","clone_url":"https://github.com/algolia/algoliasearch-client-php.git","svn_url":"https://github.com/algolia/algoliasearch-client-php","homepage":null,"size":1619,"stargazers_count":127,"watchers_count":127,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":15,"forks":49,"open_issues":15,"watchers":127,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/187"},"html":{"href":"https://github.com/algolia/algoliasearch-client-php/pull/187"},"issue":{"href":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues/187"},"comments":{"href":"https://api.github.com/repos/algolia/algoliasearch-client-php/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/algolia/algoliasearch-client-php/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/algolia/algoliasearch-client-php/statuses/6c6215690ce4b3c439d75d0f2ab3a5c15e36bcf3"}}}}
{"actor":{"display_login":"rayrutjes"}}