{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/app/pulls/comments/200667180","pull_request_review_id":135032027,"id":200667180,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDY2NzE4MA==","diff_hunk":"@@ -427,6 +427,27 @@ public static function batch( array $tasks, $priority = null ) {\n \t\treturn AsyncTaskList::batch( $taskLists, $priority );\n \t}\n \n+\t/**\n+\t * Schedule this task to be published to the queue after the main response has been flushed back to the client.\n+\t */\n+\tpublic function scheduleAsDeferredUpdate() {\n+\t\t$deferredUpdate = new class( $this ) implements \\DeferrableUpdate {\n+\n+\t\t\t/** @var BaseTask $task */\n+\t\t\tprivate $task;\n+\n+\t\t\tpublic function __construct( BaseTask $task ) {\n+\t\t\t\t$this->task = $task;\n+\t\t\t}\n+\n+\t\t\tfunction doUpdate() {\n+\t\t\t\t$this->task->queue();\n+\t\t\t}\n+\t\t};","path":"lib/Wikia/src/Tasks/Tasks/BaseTask.php","position":20,"original_position":20,"commit_id":"fb0150b81ac5638c80de8aad036b6342db8b7cf9","original_commit_id":"fb0150b81ac5638c80de8aad036b6342db8b7cf9","user":{"login":"macbre","id":1929317,"node_id":"MDQ6VXNlcjE5MjkzMTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1929317?v=4","gravatar_id":"","url":"https://api.github.com/users/macbre","html_url":"https://github.com/macbre","followers_url":"https://api.github.com/users/macbre/followers","following_url":"https://api.github.com/users/macbre/following{/other_user}","gists_url":"https://api.github.com/users/macbre/gists{/gist_id}","starred_url":"https://api.github.com/users/macbre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macbre/subscriptions","organizations_url":"https://api.github.com/users/macbre/orgs","repos_url":"https://api.github.com/users/macbre/repos","events_url":"https://api.github.com/users/macbre/events{/privacy}","received_events_url":"https://api.github.com/users/macbre/received_events","type":"User","site_admin":false},"body":"Can we actually make a class from this inline code to make this code easier to read?","created_at":"2018-07-06T14:17:31Z","updated_at":"2018-07-06T14:17:31Z","html_url":"https://github.com/Wikia/app/pull/15644#discussion_r200667180","pull_request_url":"https://api.github.com/repos/Wikia/app/pulls/15644","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Wikia/app/pulls/comments/200667180"},"html":{"href":"https://github.com/Wikia/app/pull/15644#discussion_r200667180"},"pull_request":{"href":"https://api.github.com/repos/Wikia/app/pulls/15644"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/app/pulls/15644","id":199758264,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NzU4MjY0","html_url":"https://github.com/Wikia/app/pull/15644","diff_url":"https://github.com/Wikia/app/pull/15644.diff","patch_url":"https://github.com/Wikia/app/pull/15644.patch","issue_url":"https://api.github.com/repos/Wikia/app/issues/15644","number":15644,"state":"open","locked":false,"title":"SUS-5481 | Convert Title::purgeExpiredRestrictions into background task","user":{"login":"mszabo-wikia","id":2721291,"node_id":"MDQ6VXNlcjI3MjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/2721291?v=4","gravatar_id":"","url":"https://api.github.com/users/mszabo-wikia","html_url":"https://github.com/mszabo-wikia","followers_url":"https://api.github.com/users/mszabo-wikia/followers","following_url":"https://api.github.com/users/mszabo-wikia/following{/other_user}","gists_url":"https://api.github.com/users/mszabo-wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/mszabo-wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mszabo-wikia/subscriptions","organizations_url":"https://api.github.com/users/mszabo-wikia/orgs","repos_url":"https://api.github.com/users/mszabo-wikia/repos","events_url":"https://api.github.com/users/mszabo-wikia/events{/privacy}","received_events_url":"https://api.github.com/users/mszabo-wikia/received_events","type":"User","site_admin":false},"body":"Use a lazy deferred purge via background task to remove expired page protection entries when we come across them. Remove a bunch of eager calls.\r\n\r\nSee also: [T135470](https://phabricator.wikimedia.org/T135470)\r\n\r\nhttps://wikia-inc.atlassian.net/browse/SUS-5481","created_at":"2018-07-06T14:08:01Z","updated_at":"2018-07-06T14:17:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c481b1c1fd8109ca26ea64e71e06fd6bea175e0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"drozdo","id":1019246,"node_id":"MDQ6VXNlcjEwMTkyNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/1019246?v=4","gravatar_id":"","url":"https://api.github.com/users/drozdo","html_url":"https://github.com/drozdo","followers_url":"https://api.github.com/users/drozdo/followers","following_url":"https://api.github.com/users/drozdo/following{/other_user}","gists_url":"https://api.github.com/users/drozdo/gists{/gist_id}","starred_url":"https://api.github.com/users/drozdo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drozdo/subscriptions","organizations_url":"https://api.github.com/users/drozdo/orgs","repos_url":"https://api.github.com/users/drozdo/repos","events_url":"https://api.github.com/users/drozdo/events{/privacy}","received_events_url":"https://api.github.com/users/drozdo/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":406580186,"node_id":"MDU6TGFiZWw0MDY1ODAxODY=","url":"https://api.github.com/repos/Wikia/app/labels/sus","name":"sus","color":"5319e7","default":false},{"id":944937423,"node_id":"MDU6TGFiZWw5NDQ5Mzc0MjM=","url":"https://api.github.com/repos/Wikia/app/labels/sus-performance-improvement","name":"sus-performance-improvement","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/app/pulls/15644/commits","review_comments_url":"https://api.github.com/repos/Wikia/app/pulls/15644/comments","review_comment_url":"https://api.github.com/repos/Wikia/app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/app/issues/15644/comments","statuses_url":"https://api.github.com/repos/Wikia/app/statuses/fb0150b81ac5638c80de8aad036b6342db8b7cf9","head":{"label":"Wikia:SUS-5481","ref":"SUS-5481","sha":"fb0150b81ac5638c80de8aad036b6342db8b7cf9","user":{"login":"Wikia","id":1171011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzEwMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1171011?v=4","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":5532313,"node_id":"MDEwOlJlcG9zaXRvcnk1NTMyMzEz","name":"app","full_name":"Wikia/app","owner":{"login":"Wikia","id":1171011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzEwMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1171011?v=4","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/app","description":"Wikia Application Code","fork":false,"url":"https://api.github.com/repos/Wikia/app","forks_url":"https://api.github.com/repos/Wikia/app/forks","keys_url":"https://api.github.com/repos/Wikia/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/app/teams","hooks_url":"https://api.github.com/repos/Wikia/app/hooks","issue_events_url":"https://api.github.com/repos/Wikia/app/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/app/events","assignees_url":"https://api.github.com/repos/Wikia/app/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/app/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/app/tags","blobs_url":"https://api.github.com/repos/Wikia/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/app/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/app/languages","stargazers_url":"https://api.github.com/repos/Wikia/app/stargazers","contributors_url":"https://api.github.com/repos/Wikia/app/contributors","subscribers_url":"https://api.github.com/repos/Wikia/app/subscribers","subscription_url":"https://api.github.com/repos/Wikia/app/subscription","commits_url":"https://api.github.com/repos/Wikia/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/app/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/app/merges","archive_url":"https://api.github.com/repos/Wikia/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/app/downloads","issues_url":"https://api.github.com/repos/Wikia/app/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/app/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/app/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/app/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/app/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/app/deployments","created_at":"2012-08-23T20:55:58Z","updated_at":"2018-07-06T13:15:22Z","pushed_at":"2018-07-06T14:14:46Z","git_url":"git://github.com/Wikia/app.git","ssh_url":"git@github.com:Wikia/app.git","clone_url":"https://github.com/Wikia/app.git","svn_url":"https://github.com/Wikia/app","homepage":"http://dev.wikia.com","size":763280,"stargazers_count":143,"watchers_count":143,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":113,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":113,"open_issues":19,"watchers":143,"default_branch":"dev"}},"base":{"label":"Wikia:dev","ref":"dev","sha":"6da81e4a25206ee51091e776df91a611df212026","user":{"login":"Wikia","id":1171011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzEwMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1171011?v=4","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":5532313,"node_id":"MDEwOlJlcG9zaXRvcnk1NTMyMzEz","name":"app","full_name":"Wikia/app","owner":{"login":"Wikia","id":1171011,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzEwMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1171011?v=4","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/app","description":"Wikia Application Code","fork":false,"url":"https://api.github.com/repos/Wikia/app","forks_url":"https://api.github.com/repos/Wikia/app/forks","keys_url":"https://api.github.com/repos/Wikia/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/app/teams","hooks_url":"https://api.github.com/repos/Wikia/app/hooks","issue_events_url":"https://api.github.com/repos/Wikia/app/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/app/events","assignees_url":"https://api.github.com/repos/Wikia/app/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/app/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/app/tags","blobs_url":"https://api.github.com/repos/Wikia/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/app/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/app/languages","stargazers_url":"https://api.github.com/repos/Wikia/app/stargazers","contributors_url":"https://api.github.com/repos/Wikia/app/contributors","subscribers_url":"https://api.github.com/repos/Wikia/app/subscribers","subscription_url":"https://api.github.com/repos/Wikia/app/subscription","commits_url":"https://api.github.com/repos/Wikia/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/app/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/app/merges","archive_url":"https://api.github.com/repos/Wikia/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/app/downloads","issues_url":"https://api.github.com/repos/Wikia/app/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/app/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/app/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/app/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/app/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/app/deployments","created_at":"2012-08-23T20:55:58Z","updated_at":"2018-07-06T13:15:22Z","pushed_at":"2018-07-06T14:14:46Z","git_url":"git://github.com/Wikia/app.git","ssh_url":"git@github.com:Wikia/app.git","clone_url":"https://github.com/Wikia/app.git","svn_url":"https://github.com/Wikia/app","homepage":"http://dev.wikia.com","size":763280,"stargazers_count":143,"watchers_count":143,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":113,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":113,"open_issues":19,"watchers":143,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/app/pulls/15644"},"html":{"href":"https://github.com/Wikia/app/pull/15644"},"issue":{"href":"https://api.github.com/repos/Wikia/app/issues/15644"},"comments":{"href":"https://api.github.com/repos/Wikia/app/issues/15644/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/app/pulls/15644/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/app/pulls/15644/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/app/statuses/fb0150b81ac5638c80de8aad036b6342db8b7cf9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"macbre"}}