{"action":"created","comment":{"url":"https://api.github.com/repos/rollbar/rollbar-php/pulls/comments/125165089","pull_request_review_id":47533169,"id":125165089,"diff_hunk":"@@ -60,6 +63,54 @@ public function send($scrubbedPayload, $accessToken)\n         return new Response($statusCode, json_decode($result, true), $uuid);\n     }\n \n+    public function sendBatch($batch, $accessToken)\n+    {\n+        if ($this->multiHandle === null) {\n+            $this->multiHandle = curl_multi_init();\n+        }\n+\n+        if ($this->maxBatchRequests > 0) {\n+            $this->wait($accessToken, $this->maxBatchRequests);\n+        }\n+\n+        $this->batchRequests = array_merge($this->batchRequests, $batch);\n+        $this->maybeSendMoreBatchRequests($accessToken);\n+        $this->checkForCompletedRequests($accessToken);\n+    }\n+\n+    public function wait($accessToken, $max = 0)\n+    {\n+        if (count($this->inflightRequests) <= $max) {\n+            return;\n+        }\n+        while (1) {\n+            $this->checkForCompletedRequests($accessToken);\n+            if (count($this->inflightRequests) <= $max) {\n+                break;\n+            }\n+            curl_multi_select($this->multiHandle); // or do: usleep(10000);\n+        }\n+    }\n+\n+    private function maybeSendMoreBatchRequests($accessToken)\n+    {\n+        $max = $this->maxBatchRequests-count($this->inflightRequests);","path":"src/Senders/CurlSender.php","position":54,"original_position":54,"commit_id":"2fd3bfa7d161936591bc53731d6ac1b69fc4d387","original_commit_id":"2fd3bfa7d161936591bc53731d6ac1b69fc4d387","user":{"login":"coryvirok","id":769323,"avatar_url":"https://avatars2.githubusercontent.com/u/769323?v=3","gravatar_id":"","url":"https://api.github.com/users/coryvirok","html_url":"https://github.com/coryvirok","followers_url":"https://api.github.com/users/coryvirok/followers","following_url":"https://api.github.com/users/coryvirok/following{/other_user}","gists_url":"https://api.github.com/users/coryvirok/gists{/gist_id}","starred_url":"https://api.github.com/users/coryvirok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coryvirok/subscriptions","organizations_url":"https://api.github.com/users/coryvirok/orgs","repos_url":"https://api.github.com/users/coryvirok/repos","events_url":"https://api.github.com/users/coryvirok/events{/privacy}","received_events_url":"https://api.github.com/users/coryvirok/received_events","type":"User","site_admin":false},"body":"Style: missing spaces around `-`","created_at":"2017-07-01T16:42:38Z","updated_at":"2017-07-01T16:42:38Z","html_url":"https://github.com/rollbar/rollbar-php/pull/217#discussion_r125165089","pull_request_url":"https://api.github.com/repos/rollbar/rollbar-php/pulls/217","_links":{"self":{"href":"https://api.github.com/repos/rollbar/rollbar-php/pulls/comments/125165089"},"html":{"href":"https://github.com/rollbar/rollbar-php/pull/217#discussion_r125165089"},"pull_request":{"href":"https://api.github.com/repos/rollbar/rollbar-php/pulls/217"}}},"pull_request":{"url":"https://api.github.com/repos/rollbar/rollbar-php/pulls/217","id":128226799,"html_url":"https://github.com/rollbar/rollbar-php/pull/217","diff_url":"https://github.com/rollbar/rollbar-php/pull/217.diff","patch_url":"https://github.com/rollbar/rollbar-php/pull/217.patch","issue_url":"https://api.github.com/repos/rollbar/rollbar-php/issues/217","number":217,"state":"open","locked":false,"title":"Performance fixes","user":{"login":"rokob","id":831355,"avatar_url":"https://avatars1.githubusercontent.com/u/831355?v=3","gravatar_id":"","url":"https://api.github.com/users/rokob","html_url":"https://github.com/rokob","followers_url":"https://api.github.com/users/rokob/followers","following_url":"https://api.github.com/users/rokob/following{/other_user}","gists_url":"https://api.github.com/users/rokob/gists{/gist_id}","starred_url":"https://api.github.com/users/rokob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rokob/subscriptions","organizations_url":"https://api.github.com/users/rokob/orgs","repos_url":"https://api.github.com/users/rokob/repos","events_url":"https://api.github.com/users/rokob/events{/privacy}","received_events_url":"https://api.github.com/users/rokob/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-29T19:17:27Z","updated_at":"2017-07-01T16:42:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10f8f9b3ab39e9052482aae483cb7c8dc6ee9631","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rollbar/rollbar-php/pulls/217/commits","review_comments_url":"https://api.github.com/repos/rollbar/rollbar-php/pulls/217/comments","review_comment_url":"https://api.github.com/repos/rollbar/rollbar-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rollbar/rollbar-php/issues/217/comments","statuses_url":"https://api.github.com/repos/rollbar/rollbar-php/statuses/2fd3bfa7d161936591bc53731d6ac1b69fc4d387","head":{"label":"rollbar:performance-fixes","ref":"performance-fixes","sha":"2fd3bfa7d161936591bc53731d6ac1b69fc4d387","user":{"login":"rollbar","id":3219584,"avatar_url":"https://avatars2.githubusercontent.com/u/3219584?v=3","gravatar_id":"","url":"https://api.github.com/users/rollbar","html_url":"https://github.com/rollbar","followers_url":"https://api.github.com/users/rollbar/followers","following_url":"https://api.github.com/users/rollbar/following{/other_user}","gists_url":"https://api.github.com/users/rollbar/gists{/gist_id}","starred_url":"https://api.github.com/users/rollbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rollbar/subscriptions","organizations_url":"https://api.github.com/users/rollbar/orgs","repos_url":"https://api.github.com/users/rollbar/repos","events_url":"https://api.github.com/users/rollbar/events{/privacy}","received_events_url":"https://api.github.com/users/rollbar/received_events","type":"Organization","site_admin":false},"repo":{"id":5591043,"name":"rollbar-php","full_name":"rollbar/rollbar-php","owner":{"login":"rollbar","id":3219584,"avatar_url":"https://avatars2.githubusercontent.com/u/3219584?v=3","gravatar_id":"","url":"https://api.github.com/users/rollbar","html_url":"https://github.com/rollbar","followers_url":"https://api.github.com/users/rollbar/followers","following_url":"https://api.github.com/users/rollbar/following{/other_user}","gists_url":"https://api.github.com/users/rollbar/gists{/gist_id}","starred_url":"https://api.github.com/users/rollbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rollbar/subscriptions","organizations_url":"https://api.github.com/users/rollbar/orgs","repos_url":"https://api.github.com/users/rollbar/repos","events_url":"https://api.github.com/users/rollbar/events{/privacy}","received_events_url":"https://api.github.com/users/rollbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rollbar/rollbar-php","description":"Error tracking and logging from PHP to Rollbar","fork":false,"url":"https://api.github.com/repos/rollbar/rollbar-php","forks_url":"https://api.github.com/repos/rollbar/rollbar-php/forks","keys_url":"https://api.github.com/repos/rollbar/rollbar-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rollbar/rollbar-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rollbar/rollbar-php/teams","hooks_url":"https://api.github.com/repos/rollbar/rollbar-php/hooks","issue_events_url":"https://api.github.com/repos/rollbar/rollbar-php/issues/events{/number}","events_url":"https://api.github.com/repos/rollbar/rollbar-php/events","assignees_url":"https://api.github.com/repos/rollbar/rollbar-php/assignees{/user}","branches_url":"https://api.github.com/repos/rollbar/rollbar-php/branches{/branch}","tags_url":"https://api.github.com/repos/rollbar/rollbar-php/tags","blobs_url":"https://api.github.com/repos/rollbar/rollbar-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rollbar/rollbar-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rollbar/rollbar-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/rollbar/rollbar-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rollbar/rollbar-php/statuses/{sha}","languages_url":"https://api.github.com/repos/rollbar/rollbar-php/languages","stargazers_url":"https://api.github.com/repos/rollbar/rollbar-php/stargazers","contributors_url":"https://api.github.com/repos/rollbar/rollbar-php/contributors","subscribers_url":"https://api.github.com/repos/rollbar/rollbar-php/subscribers","subscription_url":"https://api.github.com/repos/rollbar/rollbar-php/subscription","commits_url":"https://api.github.com/repos/rollbar/rollbar-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/rollbar/rollbar-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/rollbar/rollbar-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/rollbar/rollbar-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/rollbar/rollbar-php/contents/{+path}","compare_url":"https://api.github.com/repos/rollbar/rollbar-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rollbar/rollbar-php/merges","archive_url":"https://api.github.com/repos/rollbar/rollbar-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rollbar/rollbar-php/downloads","issues_url":"https://api.github.com/repos/rollbar/rollbar-php/issues{/number}","pulls_url":"https://api.github.com/repos/rollbar/rollbar-php/pulls{/number}","milestones_url":"https://api.github.com/repos/rollbar/rollbar-php/milestones{/number}","notifications_url":"https://api.github.com/repos/rollbar/rollbar-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rollbar/rollbar-php/labels{/name}","releases_url":"https://api.github.com/repos/rollbar/rollbar-php/releases{/id}","deployments_url":"https://api.github.com/repos/rollbar/rollbar-php/deployments","created_at":"2012-08-28T19:39:28Z","updated_at":"2017-07-01T13:17:32Z","pushed_at":"2017-07-01T07:57:25Z","git_url":"git://github.com/rollbar/rollbar-php.git","ssh_url":"git@github.com:rollbar/rollbar-php.git","clone_url":"https://github.com/rollbar/rollbar-php.git","svn_url":"https://github.com/rollbar/rollbar-php","homepage":"https://rollbar.com/docs/notifier/rollbar-php/","size":844,"stargazers_count":145,"watchers_count":145,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":15,"forks":77,"open_issues":15,"watchers":145,"default_branch":"master"}},"base":{"label":"rollbar:master","ref":"master","sha":"3f3d6389b648e199925a01ac6d05d1c6e57af961","user":{"login":"rollbar","id":3219584,"avatar_url":"https://avatars2.githubusercontent.com/u/3219584?v=3","gravatar_id":"","url":"https://api.github.com/users/rollbar","html_url":"https://github.com/rollbar","followers_url":"https://api.github.com/users/rollbar/followers","following_url":"https://api.github.com/users/rollbar/following{/other_user}","gists_url":"https://api.github.com/users/rollbar/gists{/gist_id}","starred_url":"https://api.github.com/users/rollbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rollbar/subscriptions","organizations_url":"https://api.github.com/users/rollbar/orgs","repos_url":"https://api.github.com/users/rollbar/repos","events_url":"https://api.github.com/users/rollbar/events{/privacy}","received_events_url":"https://api.github.com/users/rollbar/received_events","type":"Organization","site_admin":false},"repo":{"id":5591043,"name":"rollbar-php","full_name":"rollbar/rollbar-php","owner":{"login":"rollbar","id":3219584,"avatar_url":"https://avatars2.githubusercontent.com/u/3219584?v=3","gravatar_id":"","url":"https://api.github.com/users/rollbar","html_url":"https://github.com/rollbar","followers_url":"https://api.github.com/users/rollbar/followers","following_url":"https://api.github.com/users/rollbar/following{/other_user}","gists_url":"https://api.github.com/users/rollbar/gists{/gist_id}","starred_url":"https://api.github.com/users/rollbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rollbar/subscriptions","organizations_url":"https://api.github.com/users/rollbar/orgs","repos_url":"https://api.github.com/users/rollbar/repos","events_url":"https://api.github.com/users/rollbar/events{/privacy}","received_events_url":"https://api.github.com/users/rollbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rollbar/rollbar-php","description":"Error tracking and logging from PHP to Rollbar","fork":false,"url":"https://api.github.com/repos/rollbar/rollbar-php","forks_url":"https://api.github.com/repos/rollbar/rollbar-php/forks","keys_url":"https://api.github.com/repos/rollbar/rollbar-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rollbar/rollbar-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rollbar/rollbar-php/teams","hooks_url":"https://api.github.com/repos/rollbar/rollbar-php/hooks","issue_events_url":"https://api.github.com/repos/rollbar/rollbar-php/issues/events{/number}","events_url":"https://api.github.com/repos/rollbar/rollbar-php/events","assignees_url":"https://api.github.com/repos/rollbar/rollbar-php/assignees{/user}","branches_url":"https://api.github.com/repos/rollbar/rollbar-php/branches{/branch}","tags_url":"https://api.github.com/repos/rollbar/rollbar-php/tags","blobs_url":"https://api.github.com/repos/rollbar/rollbar-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rollbar/rollbar-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rollbar/rollbar-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/rollbar/rollbar-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rollbar/rollbar-php/statuses/{sha}","languages_url":"https://api.github.com/repos/rollbar/rollbar-php/languages","stargazers_url":"https://api.github.com/repos/rollbar/rollbar-php/stargazers","contributors_url":"https://api.github.com/repos/rollbar/rollbar-php/contributors","subscribers_url":"https://api.github.com/repos/rollbar/rollbar-php/subscribers","subscription_url":"https://api.github.com/repos/rollbar/rollbar-php/subscription","commits_url":"https://api.github.com/repos/rollbar/rollbar-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/rollbar/rollbar-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/rollbar/rollbar-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/rollbar/rollbar-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/rollbar/rollbar-php/contents/{+path}","compare_url":"https://api.github.com/repos/rollbar/rollbar-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rollbar/rollbar-php/merges","archive_url":"https://api.github.com/repos/rollbar/rollbar-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rollbar/rollbar-php/downloads","issues_url":"https://api.github.com/repos/rollbar/rollbar-php/issues{/number}","pulls_url":"https://api.github.com/repos/rollbar/rollbar-php/pulls{/number}","milestones_url":"https://api.github.com/repos/rollbar/rollbar-php/milestones{/number}","notifications_url":"https://api.github.com/repos/rollbar/rollbar-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rollbar/rollbar-php/labels{/name}","releases_url":"https://api.github.com/repos/rollbar/rollbar-php/releases{/id}","deployments_url":"https://api.github.com/repos/rollbar/rollbar-php/deployments","created_at":"2012-08-28T19:39:28Z","updated_at":"2017-07-01T13:17:32Z","pushed_at":"2017-07-01T07:57:25Z","git_url":"git://github.com/rollbar/rollbar-php.git","ssh_url":"git@github.com:rollbar/rollbar-php.git","clone_url":"https://github.com/rollbar/rollbar-php.git","svn_url":"https://github.com/rollbar/rollbar-php","homepage":"https://rollbar.com/docs/notifier/rollbar-php/","size":844,"stargazers_count":145,"watchers_count":145,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":15,"forks":77,"open_issues":15,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rollbar/rollbar-php/pulls/217"},"html":{"href":"https://github.com/rollbar/rollbar-php/pull/217"},"issue":{"href":"https://api.github.com/repos/rollbar/rollbar-php/issues/217"},"comments":{"href":"https://api.github.com/repos/rollbar/rollbar-php/issues/217/comments"},"review_comments":{"href":"https://api.github.com/repos/rollbar/rollbar-php/pulls/217/comments"},"review_comment":{"href":"https://api.github.com/repos/rollbar/rollbar-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rollbar/rollbar-php/pulls/217/commits"},"statuses":{"href":"https://api.github.com/repos/rollbar/rollbar-php/statuses/2fd3bfa7d161936591bc53731d6ac1b69fc4d387"}}}}
{"actor":{"display_login":"coryvirok"}}