{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/jetpack/issues/5413","repository_url":"https://api.github.com/repos/Automattic/jetpack","labels_url":"https://api.github.com/repos/Automattic/jetpack/issues/5413/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/jetpack/issues/5413/comments","events_url":"https://api.github.com/repos/Automattic/jetpack/issues/5413/events","html_url":"https://github.com/Automattic/jetpack/pull/5413","id":185204202,"number":5413,"title":"Sync: Allow unlocking callables via action","user":{"login":"ebinnion","id":1126811,"avatar_url":"https://avatars.githubusercontent.com/u/1126811?v=3","gravatar_id":"","url":"https://api.github.com/users/ebinnion","html_url":"https://github.com/ebinnion","followers_url":"https://api.github.com/users/ebinnion/followers","following_url":"https://api.github.com/users/ebinnion/following{/other_user}","gists_url":"https://api.github.com/users/ebinnion/gists{/gist_id}","starred_url":"https://api.github.com/users/ebinnion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebinnion/subscriptions","organizations_url":"https://api.github.com/users/ebinnion/orgs","repos_url":"https://api.github.com/users/ebinnion/repos","events_url":"https://api.github.com/users/ebinnion/events{/privacy}","received_events_url":"https://api.github.com/users/ebinnion/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/jetpack/labels/IDC","name":"IDC","color":"e99695"},{"url":"https://api.github.com/repos/Automattic/jetpack/labels/Sync","name":"Sync","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/jetpack/labels/[Status]%20Review%20Complete","name":"[Status] Review Complete","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"ebinnion","id":1126811,"avatar_url":"https://avatars.githubusercontent.com/u/1126811?v=3","gravatar_id":"","url":"https://api.github.com/users/ebinnion","html_url":"https://github.com/ebinnion","followers_url":"https://api.github.com/users/ebinnion/followers","following_url":"https://api.github.com/users/ebinnion/following{/other_user}","gists_url":"https://api.github.com/users/ebinnion/gists{/gist_id}","starred_url":"https://api.github.com/users/ebinnion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebinnion/subscriptions","organizations_url":"https://api.github.com/users/ebinnion/orgs","repos_url":"https://api.github.com/users/ebinnion/repos","events_url":"https://api.github.com/users/ebinnion/events{/privacy}","received_events_url":"https://api.github.com/users/ebinnion/received_events","type":"User","site_admin":false},"assignees":[{"login":"ebinnion","id":1126811,"avatar_url":"https://avatars.githubusercontent.com/u/1126811?v=3","gravatar_id":"","url":"https://api.github.com/users/ebinnion","html_url":"https://github.com/ebinnion","followers_url":"https://api.github.com/users/ebinnion/followers","following_url":"https://api.github.com/users/ebinnion/following{/other_user}","gists_url":"https://api.github.com/users/ebinnion/gists{/gist_id}","starred_url":"https://api.github.com/users/ebinnion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebinnion/subscriptions","organizations_url":"https://api.github.com/users/ebinnion/orgs","repos_url":"https://api.github.com/users/ebinnion/repos","events_url":"https://api.github.com/users/ebinnion/events{/privacy}","received_events_url":"https://api.github.com/users/ebinnion/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Automattic/jetpack/milestones/54","html_url":"https://github.com/Automattic/jetpack/milestones/4.4","labels_url":"https://api.github.com/repos/Automattic/jetpack/milestones/54/labels","id":1869985,"number":54,"title":"4.4","description":"","creator":{"login":"richardmuscat","id":2287740,"avatar_url":"https://avatars.githubusercontent.com/u/2287740?v=3","gravatar_id":"","url":"https://api.github.com/users/richardmuscat","html_url":"https://github.com/richardmuscat","followers_url":"https://api.github.com/users/richardmuscat/followers","following_url":"https://api.github.com/users/richardmuscat/following{/other_user}","gists_url":"https://api.github.com/users/richardmuscat/gists{/gist_id}","starred_url":"https://api.github.com/users/richardmuscat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardmuscat/subscriptions","organizations_url":"https://api.github.com/users/richardmuscat/orgs","repos_url":"https://api.github.com/users/richardmuscat/repos","events_url":"https://api.github.com/users/richardmuscat/events{/privacy}","received_events_url":"https://api.github.com/users/richardmuscat/received_events","type":"User","site_admin":false},"open_issues":377,"closed_issues":66,"state":"open","created_at":"2016-07-07T13:38:22Z","updated_at":"2016-10-25T20:37:53Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-10-25T18:57:37Z","updated_at":"2016-10-25T20:41:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/5413","html_url":"https://github.com/Automattic/jetpack/pull/5413","diff_url":"https://github.com/Automattic/jetpack/pull/5413.diff","patch_url":"https://github.com/Automattic/jetpack/pull/5413.patch"},"body":"Fixes #5358 \r\n\r\nThe original issue calls for using the home and siteurl values that we send with each sync request. But, the more I think about it, I believe we should hold off on that for now. We haven't really dug in to WPML and domain mapping, and what we learn there could be valuable. So, before we change a very important part of sync, I believe we should do some more due diligence.\r\n\r\nI previously tried adding this in #5305. This action would allow a developer to clear the callable await transient with something like `wp_schedule_single_event( time() + 1, 'jetpack_sync_unlock_sync_callable' )`.\r\n\r\nPreviously, we didn't include this because a developer could call the public method directly. But, scheduling a single event does seem simpler and also less prone to errors if we, say, change the name of the method in the future. For example, we already changed `Jetpack_Sync_Actions::schedule_full_sync()` to `Jetpack_Sync_Actions::do_full_sync()`.\r\n\r\nThe use case for this is to help hosts provide more real-time sync of the home and siteurl options when the home and siteurl options are set via constant.\r\n\r\nI considered a few other approaches, one of which included checking if the home or siteurl values were different from their checksum on the `shutdown` action, but then we could run into cases where the constant is defined dynamically based on what is in ` $_SERVER['HTTP_HOST']` or where the home and siteurl change often because of domain mapping or WPML.\r\n\r\nSomething like this seems to be the safest change for all hosts. We are allowing them the option to help sync faster than 2-3 minutes, but not adding more potential issues.\r\n\r\ncc @lezama @enejb @gravityrail for code review."},"comment":{"url":"https://api.github.com/repos/Automattic/jetpack/issues/comments/256169413","html_url":"https://github.com/Automattic/jetpack/pull/5413#issuecomment-256169413","issue_url":"https://api.github.com/repos/Automattic/jetpack/issues/5413","id":256169413,"user":{"login":"lezama","id":104869,"avatar_url":"https://avatars.githubusercontent.com/u/104869?v=3","gravatar_id":"","url":"https://api.github.com/users/lezama","html_url":"https://github.com/lezama","followers_url":"https://api.github.com/users/lezama/followers","following_url":"https://api.github.com/users/lezama/following{/other_user}","gists_url":"https://api.github.com/users/lezama/gists{/gist_id}","starred_url":"https://api.github.com/users/lezama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lezama/subscriptions","organizations_url":"https://api.github.com/users/lezama/orgs","repos_url":"https://api.github.com/users/lezama/repos","events_url":"https://api.github.com/users/lezama/events{/privacy}","received_events_url":"https://api.github.com/users/lezama/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T20:41:49Z","updated_at":"2016-10-25T20:41:49Z","body":":shipit: "}}
{"actor":{"display_login":"lezama"}}