{"action":"created","comment":{"url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/comments/46891274","id":46891274,"diff_hunk":"@@ -790,11 +778,35 @@ public static function cross_post($post, $medium_post, $medium_user) {\n       $path = \"/v1/users/{$medium_user->id}/posts\";\n     }\n \n-    $created_medium_post = self::_medium_request(\"POST\", $path, $medium_user->token, $data, array(\n-      \"Content-Type\" => \"application/json\"\n-    ));\n+    try {\n+      $created_medium_post = self::_medium_request(\"POST\", $path, $medium_user->token, $data, array(\n+        \"Content-Type\" => \"application/json\"\n+      ));\n+    } catch (Exception $err) {\n+      // Retry once if we got a timeout\n+      if ($err->getCode() == 1001) {\n+        error_log(\"RETRYING POST $post->ID '$post->post_title' due to timeout, delaying...\");","path":"lib/medium-admin.php","position":42,"original_position":42,"commit_id":"ae832bfe920069de5144f88e296d4638301f03b8","original_commit_id":"ae832bfe920069de5144f88e296d4638301f03b8","user":{"login":"majelbstoat","id":425787,"avatar_url":"https://avatars.githubusercontent.com/u/425787?v=3","gravatar_id":"","url":"https://api.github.com/users/majelbstoat","html_url":"https://github.com/majelbstoat","followers_url":"https://api.github.com/users/majelbstoat/followers","following_url":"https://api.github.com/users/majelbstoat/following{/other_user}","gists_url":"https://api.github.com/users/majelbstoat/gists{/gist_id}","starred_url":"https://api.github.com/users/majelbstoat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majelbstoat/subscriptions","organizations_url":"https://api.github.com/users/majelbstoat/orgs","repos_url":"https://api.github.com/users/majelbstoat/repos","events_url":"https://api.github.com/users/majelbstoat/events{/privacy}","received_events_url":"https://api.github.com/users/majelbstoat/received_events","type":"User","site_admin":false},"body":"Is the timeout happening on medium? or on the local server?","created_at":"2015-12-07T22:54:37Z","updated_at":"2015-12-07T22:54:37Z","html_url":"https://github.com/Medium/medium-wordpress-plugin/pull/56#discussion_r46891274","pull_request_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/comments/46891274"},"html":{"href":"https://github.com/Medium/medium-wordpress-plugin/pull/56#discussion_r46891274"},"pull_request":{"href":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/56","id":52904527,"html_url":"https://github.com/Medium/medium-wordpress-plugin/pull/56","diff_url":"https://github.com/Medium/medium-wordpress-plugin/pull/56.diff","patch_url":"https://github.com/Medium/medium-wordpress-plugin/pull/56.patch","issue_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues/56","number":56,"state":"open","locked":false,"title":"Add retries and fix claims calls","user":{"login":"kylehg","id":766868,"avatar_url":"https://avatars.githubusercontent.com/u/766868?v=3","gravatar_id":"","url":"https://api.github.com/users/kylehg","html_url":"https://github.com/kylehg","followers_url":"https://api.github.com/users/kylehg/followers","following_url":"https://api.github.com/users/kylehg/following{/other_user}","gists_url":"https://api.github.com/users/kylehg/gists{/gist_id}","starred_url":"https://api.github.com/users/kylehg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylehg/subscriptions","organizations_url":"https://api.github.com/users/kylehg/orgs","repos_url":"https://api.github.com/users/kylehg/repos","events_url":"https://api.github.com/users/kylehg/events{/privacy}","received_events_url":"https://api.github.com/users/kylehg/received_events","type":"User","site_admin":false},"body":"@mikkot @majelbstoat \r\n\r\n(I'll squash commits before merging)","created_at":"2015-12-07T21:37:42Z","updated_at":"2015-12-07T22:54:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93c4013cfe195f75bd8403c7c7d3cd99f995c66f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/56/commits","review_comments_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/56/comments","review_comment_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues/56/comments","statuses_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/statuses/ae832bfe920069de5144f88e296d4638301f03b8","head":{"label":"Medium:kyle-retry","ref":"kyle-retry","sha":"ae832bfe920069de5144f88e296d4638301f03b8","user":{"login":"Medium","id":923954,"avatar_url":"https://avatars.githubusercontent.com/u/923954?v=3","gravatar_id":"","url":"https://api.github.com/users/Medium","html_url":"https://github.com/Medium","followers_url":"https://api.github.com/users/Medium/followers","following_url":"https://api.github.com/users/Medium/following{/other_user}","gists_url":"https://api.github.com/users/Medium/gists{/gist_id}","starred_url":"https://api.github.com/users/Medium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Medium/subscriptions","organizations_url":"https://api.github.com/users/Medium/orgs","repos_url":"https://api.github.com/users/Medium/repos","events_url":"https://api.github.com/users/Medium/events{/privacy}","received_events_url":"https://api.github.com/users/Medium/received_events","type":"Organization","site_admin":false},"repo":{"id":43514675,"name":"medium-wordpress-plugin","full_name":"Medium/medium-wordpress-plugin","owner":{"login":"Medium","id":923954,"avatar_url":"https://avatars.githubusercontent.com/u/923954?v=3","gravatar_id":"","url":"https://api.github.com/users/Medium","html_url":"https://github.com/Medium","followers_url":"https://api.github.com/users/Medium/followers","following_url":"https://api.github.com/users/Medium/following{/other_user}","gists_url":"https://api.github.com/users/Medium/gists{/gist_id}","starred_url":"https://api.github.com/users/Medium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Medium/subscriptions","organizations_url":"https://api.github.com/users/Medium/orgs","repos_url":"https://api.github.com/users/Medium/repos","events_url":"https://api.github.com/users/Medium/events{/privacy}","received_events_url":"https://api.github.com/users/Medium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Medium/medium-wordpress-plugin","description":"The official WordPress plugin for cross-posting to Medium.","fork":false,"url":"https://api.github.com/repos/Medium/medium-wordpress-plugin","forks_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/forks","keys_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/teams","hooks_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/hooks","issue_events_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/events","assignees_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/tags","blobs_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/languages","stargazers_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/stargazers","contributors_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/contributors","subscribers_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/subscribers","subscription_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/subscription","commits_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/merges","archive_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/downloads","issues_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/labels{/name}","releases_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/releases{/id}","created_at":"2015-10-01T18:51:39Z","updated_at":"2015-11-27T00:07:33Z","pushed_at":"2015-12-07T22:03:49Z","git_url":"git://github.com/Medium/medium-wordpress-plugin.git","ssh_url":"git@github.com:Medium/medium-wordpress-plugin.git","clone_url":"https://github.com/Medium/medium-wordpress-plugin.git","svn_url":"https://github.com/Medium/medium-wordpress-plugin","homepage":"https://medium.com","size":1417,"stargazers_count":77,"watchers_count":77,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":3,"forks":15,"open_issues":3,"watchers":77,"default_branch":"master"}},"base":{"label":"Medium:master","ref":"master","sha":"050d141db10b49db53244f3d7e7bc492f55f7744","user":{"login":"Medium","id":923954,"avatar_url":"https://avatars.githubusercontent.com/u/923954?v=3","gravatar_id":"","url":"https://api.github.com/users/Medium","html_url":"https://github.com/Medium","followers_url":"https://api.github.com/users/Medium/followers","following_url":"https://api.github.com/users/Medium/following{/other_user}","gists_url":"https://api.github.com/users/Medium/gists{/gist_id}","starred_url":"https://api.github.com/users/Medium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Medium/subscriptions","organizations_url":"https://api.github.com/users/Medium/orgs","repos_url":"https://api.github.com/users/Medium/repos","events_url":"https://api.github.com/users/Medium/events{/privacy}","received_events_url":"https://api.github.com/users/Medium/received_events","type":"Organization","site_admin":false},"repo":{"id":43514675,"name":"medium-wordpress-plugin","full_name":"Medium/medium-wordpress-plugin","owner":{"login":"Medium","id":923954,"avatar_url":"https://avatars.githubusercontent.com/u/923954?v=3","gravatar_id":"","url":"https://api.github.com/users/Medium","html_url":"https://github.com/Medium","followers_url":"https://api.github.com/users/Medium/followers","following_url":"https://api.github.com/users/Medium/following{/other_user}","gists_url":"https://api.github.com/users/Medium/gists{/gist_id}","starred_url":"https://api.github.com/users/Medium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Medium/subscriptions","organizations_url":"https://api.github.com/users/Medium/orgs","repos_url":"https://api.github.com/users/Medium/repos","events_url":"https://api.github.com/users/Medium/events{/privacy}","received_events_url":"https://api.github.com/users/Medium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Medium/medium-wordpress-plugin","description":"The official WordPress plugin for cross-posting to Medium.","fork":false,"url":"https://api.github.com/repos/Medium/medium-wordpress-plugin","forks_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/forks","keys_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/teams","hooks_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/hooks","issue_events_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/events","assignees_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/tags","blobs_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/languages","stargazers_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/stargazers","contributors_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/contributors","subscribers_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/subscribers","subscription_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/subscription","commits_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/merges","archive_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/downloads","issues_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/labels{/name}","releases_url":"https://api.github.com/repos/Medium/medium-wordpress-plugin/releases{/id}","created_at":"2015-10-01T18:51:39Z","updated_at":"2015-11-27T00:07:33Z","pushed_at":"2015-12-07T22:03:49Z","git_url":"git://github.com/Medium/medium-wordpress-plugin.git","ssh_url":"git@github.com:Medium/medium-wordpress-plugin.git","clone_url":"https://github.com/Medium/medium-wordpress-plugin.git","svn_url":"https://github.com/Medium/medium-wordpress-plugin","homepage":"https://medium.com","size":1417,"stargazers_count":77,"watchers_count":77,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":3,"forks":15,"open_issues":3,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/56"},"html":{"href":"https://github.com/Medium/medium-wordpress-plugin/pull/56"},"issue":{"href":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues/56"},"comments":{"href":"https://api.github.com/repos/Medium/medium-wordpress-plugin/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Medium/medium-wordpress-plugin/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/Medium/medium-wordpress-plugin/statuses/ae832bfe920069de5144f88e296d4638301f03b8"}}}}