{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/69939484","id":69939484,"diff_hunk":"@@ -95,7 +95,7 @@ function receive( $data, $token = null ) {\n \t\t\t * @param double $timestamp Timestamp (in seconds) when the action occurred\n \t\t\t * @param array $token The auth token used to invoke the API","path":"sync/class.jetpack-sync-server.php","position":null,"original_position":20,"commit_id":"a89f09565a1bf29417a73474ca347cc356650904","original_commit_id":"b46a665732b550cfc137b864d8b8b48b3c4c7700","user":{"login":"gravityrail","id":51896,"avatar_url":"https://avatars.githubusercontent.com/u/51896?v=3","gravatar_id":"","url":"https://api.github.com/users/gravityrail","html_url":"https://github.com/gravityrail","followers_url":"https://api.github.com/users/gravityrail/followers","following_url":"https://api.github.com/users/gravityrail/following{/other_user}","gists_url":"https://api.github.com/users/gravityrail/gists{/gist_id}","starred_url":"https://api.github.com/users/gravityrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravityrail/subscriptions","organizations_url":"https://api.github.com/users/gravityrail/orgs","repos_url":"https://api.github.com/users/gravityrail/repos","events_url":"https://api.github.com/users/gravityrail/events{/privacy}","received_events_url":"https://api.github.com/users/gravityrail/received_events","type":"User","site_admin":false},"body":"Done!","created_at":"2016-07-07T16:26:54Z","updated_at":"2016-07-07T16:26:54Z","html_url":"https://github.com/Automattic/jetpack/pull/4324#discussion_r69939484","pull_request_url":"https://api.github.com/repos/Automattic/jetpack/pulls/4324","_links":{"self":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/69939484"},"html":{"href":"https://github.com/Automattic/jetpack/pull/4324#discussion_r69939484"},"pull_request":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/4324"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/4324","id":76522728,"html_url":"https://github.com/Automattic/jetpack/pull/4324","diff_url":"https://github.com/Automattic/jetpack/pull/4324.diff","patch_url":"https://github.com/Automattic/jetpack/pull/4324.patch","issue_url":"https://api.github.com/repos/Automattic/jetpack/issues/4324","number":4324,"state":"open","locked":false,"title":"Add sent time to synced actions so we know action age and site-local time","user":{"login":"gravityrail","id":51896,"avatar_url":"https://avatars.githubusercontent.com/u/51896?v=3","gravatar_id":"","url":"https://api.github.com/users/gravityrail","html_url":"https://github.com/gravityrail","followers_url":"https://api.github.com/users/gravityrail/followers","following_url":"https://api.github.com/users/gravityrail/following{/other_user}","gists_url":"https://api.github.com/users/gravityrail/gists{/gist_id}","starred_url":"https://api.github.com/users/gravityrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravityrail/subscriptions","organizations_url":"https://api.github.com/users/gravityrail/orgs","repos_url":"https://api.github.com/users/gravityrail/repos","events_url":"https://api.github.com/users/gravityrail/events{/privacy}","received_events_url":"https://api.github.com/users/gravityrail/received_events","type":"User","site_admin":false},"body":"We had a couple of requirements for sync that have been rolled into sync here:\r\n\r\n- tracking the latency of sync at a fairly tight granularity, so we can tell if any sites are getting way behind and tune things accordingly.\r\n- tracking the clock skew of Jetpack sites relative to WPCOM. Within reason, this helps us do that (it's not a real \"clock sync\" protocol, but tracking event times and relative clocks within 10 seconds is probably OK).\r\n\r\nPros:\r\n- don't need additional endpoint or protocol for figuring out what time a Jetpack site thinks it is\r\n\r\nCons:\r\n- duplication - this adds the local time to every outbound action, even though it's the same for all of them. This was done in the name of simplicity at the other end, not having to grab some header value etc.\r\n\r\nAlternative approach: We could add local time since epoch (`microtime(true)`) as a header parameter to the XMLRPC call. This feels brittle and weird though, and it's harder to test in our suite.","created_at":"2016-07-07T00:22:06Z","updated_at":"2016-07-07T16:26:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55e447b0c9939a09b0fcbf906b0f9ab1475a77ff","assignee":{"login":"gravityrail","id":51896,"avatar_url":"https://avatars.githubusercontent.com/u/51896?v=3","gravatar_id":"","url":"https://api.github.com/users/gravityrail","html_url":"https://github.com/gravityrail","followers_url":"https://api.github.com/users/gravityrail/followers","following_url":"https://api.github.com/users/gravityrail/following{/other_user}","gists_url":"https://api.github.com/users/gravityrail/gists{/gist_id}","starred_url":"https://api.github.com/users/gravityrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravityrail/subscriptions","organizations_url":"https://api.github.com/users/gravityrail/orgs","repos_url":"https://api.github.com/users/gravityrail/repos","events_url":"https://api.github.com/users/gravityrail/events{/privacy}","received_events_url":"https://api.github.com/users/gravityrail/received_events","type":"User","site_admin":false},"assignees":[{"login":"gravityrail","id":51896,"avatar_url":"https://avatars.githubusercontent.com/u/51896?v=3","gravatar_id":"","url":"https://api.github.com/users/gravityrail","html_url":"https://github.com/gravityrail","followers_url":"https://api.github.com/users/gravityrail/followers","following_url":"https://api.github.com/users/gravityrail/following{/other_user}","gists_url":"https://api.github.com/users/gravityrail/gists{/gist_id}","starred_url":"https://api.github.com/users/gravityrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravityrail/subscriptions","organizations_url":"https://api.github.com/users/gravityrail/orgs","repos_url":"https://api.github.com/users/gravityrail/repos","events_url":"https://api.github.com/users/gravityrail/events{/privacy}","received_events_url":"https://api.github.com/users/gravityrail/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Automattic/jetpack/milestones/38","html_url":"https://github.com/Automattic/jetpack/milestones/4.2","labels_url":"https://api.github.com/repos/Automattic/jetpack/milestones/38/labels","id":1587930,"number":38,"title":"4.2","description":"","creator":{"login":"jeherve","id":426388,"avatar_url":"https://avatars.githubusercontent.com/u/426388?v=3","gravatar_id":"","url":"https://api.github.com/users/jeherve","html_url":"https://github.com/jeherve","followers_url":"https://api.github.com/users/jeherve/followers","following_url":"https://api.github.com/users/jeherve/following{/other_user}","gists_url":"https://api.github.com/users/jeherve/gists{/gist_id}","starred_url":"https://api.github.com/users/jeherve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeherve/subscriptions","organizations_url":"https://api.github.com/users/jeherve/orgs","repos_url":"https://api.github.com/users/jeherve/repos","events_url":"https://api.github.com/users/jeherve/events{/privacy}","received_events_url":"https://api.github.com/users/jeherve/received_events","type":"User","site_admin":false},"open_issues":68,"closed_issues":95,"state":"open","created_at":"2016-02-17T09:30:43Z","updated_at":"2016-07-07T16:03:39Z","due_on":"2016-07-24T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Automattic/jetpack/pulls/4324/commits","review_comments_url":"https://api.github.com/repos/Automattic/jetpack/pulls/4324/comments","review_comment_url":"https://api.github.com/repos/Automattic/jetpack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/jetpack/issues/4324/comments","statuses_url":"https://api.github.com/repos/Automattic/jetpack/statuses/a89f09565a1bf29417a73474ca347cc356650904","head":{"label":"Automattic:add/sent-time-to-sync-actions","ref":"add/sent-time-to-sync-actions","sha":"a89f09565a1bf29417a73474ca347cc356650904","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":15231212,"name":"jetpack","full_name":"Automattic/jetpack","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/jetpack","description":"Increase your traffic, view your stats, speed up your site, and protect yourself from hackers with Jetpack.","fork":false,"url":"https://api.github.com/repos/Automattic/jetpack","forks_url":"https://api.github.com/repos/Automattic/jetpack/forks","keys_url":"https://api.github.com/repos/Automattic/jetpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/jetpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/jetpack/teams","hooks_url":"https://api.github.com/repos/Automattic/jetpack/hooks","issue_events_url":"https://api.github.com/repos/Automattic/jetpack/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/jetpack/events","assignees_url":"https://api.github.com/repos/Automattic/jetpack/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/jetpack/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/jetpack/tags","blobs_url":"https://api.github.com/repos/Automattic/jetpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/jetpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/jetpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/jetpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/jetpack/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/jetpack/languages","stargazers_url":"https://api.github.com/repos/Automattic/jetpack/stargazers","contributors_url":"https://api.github.com/repos/Automattic/jetpack/contributors","subscribers_url":"https://api.github.com/repos/Automattic/jetpack/subscribers","subscription_url":"https://api.github.com/repos/Automattic/jetpack/subscription","commits_url":"https://api.github.com/repos/Automattic/jetpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/jetpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/jetpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/jetpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/jetpack/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/jetpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/jetpack/merges","archive_url":"https://api.github.com/repos/Automattic/jetpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/jetpack/downloads","issues_url":"https://api.github.com/repos/Automattic/jetpack/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/jetpack/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/jetpack/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/jetpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/jetpack/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/jetpack/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/jetpack/deployments","created_at":"2013-12-16T16:43:01Z","updated_at":"2016-07-06T23:13:12Z","pushed_at":"2016-07-07T16:26:36Z","git_url":"git://github.com/Automattic/jetpack.git","ssh_url":"git@github.com:Automattic/jetpack.git","clone_url":"https://github.com/Automattic/jetpack.git","svn_url":"https://github.com/Automattic/jetpack","homepage":"http://jetpack.com","size":283414,"stargazers_count":544,"watchers_count":544,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":332,"mirror_url":null,"open_issues_count":710,"forks":332,"open_issues":710,"watchers":544,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"3cb9afc8f63c50330fdaad7d7bbd1630ad944927","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":15231212,"name":"jetpack","full_name":"Automattic/jetpack","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/jetpack","description":"Increase your traffic, view your stats, speed up your site, and protect yourself from hackers with Jetpack.","fork":false,"url":"https://api.github.com/repos/Automattic/jetpack","forks_url":"https://api.github.com/repos/Automattic/jetpack/forks","keys_url":"https://api.github.com/repos/Automattic/jetpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/jetpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/jetpack/teams","hooks_url":"https://api.github.com/repos/Automattic/jetpack/hooks","issue_events_url":"https://api.github.com/repos/Automattic/jetpack/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/jetpack/events","assignees_url":"https://api.github.com/repos/Automattic/jetpack/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/jetpack/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/jetpack/tags","blobs_url":"https://api.github.com/repos/Automattic/jetpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/jetpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/jetpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/jetpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/jetpack/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/jetpack/languages","stargazers_url":"https://api.github.com/repos/Automattic/jetpack/stargazers","contributors_url":"https://api.github.com/repos/Automattic/jetpack/contributors","subscribers_url":"https://api.github.com/repos/Automattic/jetpack/subscribers","subscription_url":"https://api.github.com/repos/Automattic/jetpack/subscription","commits_url":"https://api.github.com/repos/Automattic/jetpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/jetpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/jetpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/jetpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/jetpack/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/jetpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/jetpack/merges","archive_url":"https://api.github.com/repos/Automattic/jetpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/jetpack/downloads","issues_url":"https://api.github.com/repos/Automattic/jetpack/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/jetpack/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/jetpack/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/jetpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/jetpack/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/jetpack/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/jetpack/deployments","created_at":"2013-12-16T16:43:01Z","updated_at":"2016-07-06T23:13:12Z","pushed_at":"2016-07-07T16:26:36Z","git_url":"git://github.com/Automattic/jetpack.git","ssh_url":"git@github.com:Automattic/jetpack.git","clone_url":"https://github.com/Automattic/jetpack.git","svn_url":"https://github.com/Automattic/jetpack","homepage":"http://jetpack.com","size":283414,"stargazers_count":544,"watchers_count":544,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":332,"mirror_url":null,"open_issues_count":710,"forks":332,"open_issues":710,"watchers":544,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/4324"},"html":{"href":"https://github.com/Automattic/jetpack/pull/4324"},"issue":{"href":"https://api.github.com/repos/Automattic/jetpack/issues/4324"},"comments":{"href":"https://api.github.com/repos/Automattic/jetpack/issues/4324/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/4324/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/4324/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/jetpack/statuses/a89f09565a1bf29417a73474ca347cc356650904"}}}}
{"actor":{"display_login":"gravityrail"}}