From: Aaron Schulz Date: Wed, 11 Sep 2019 21:56:24 +0000 (-0700) Subject: Cleanup Title::touchLinks() to use JobQueueGroup::lazyPush() in one batch X-Git-Tag: 1.34.0-rc.0~256 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%22http:/wikimediafoundation.org/fundraising/%7B%7B%20url_for%28%27user_settings%27%2C%20userid=session.userid%29%20%7D%7D?a=commitdiff_plain;h=09de96eb4b52af8c0a824c9063da623f9cfc6433;p=lhc%2Fweb%2Fwiklou.git Cleanup Title::touchLinks() to use JobQueueGroup::lazyPush() in one batch Change-Id: I45f36a06cc333170f60162ee37b464865b6bdc37 --- diff --git a/includes/Title.php b/includes/Title.php index 81c68767e0..bdff7a759f 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4270,12 +4270,21 @@ class Title implements LinkTarget, IDBAccessObject { * on the number of links. Typically called on create and delete. */ public function touchLinks() { - DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'pagelinks', 'page-touch' ) ); + $jobs = []; + $jobs[] = HTMLCacheUpdateJob::newForBacklinks( + $this, + 'pagelinks', + [ 'causeAction' => 'page-touch' ] + ); if ( $this->mNamespace == NS_CATEGORY ) { - DeferredUpdates::addUpdate( - new HTMLCacheUpdate( $this, 'categorylinks', 'category-touch' ) + $jobs[] = HTMLCacheUpdateJob::newForBacklinks( + $this, + 'categorylinks', + [ 'causeAction' => 'category-touch' ] ); } + + JobQueueGroup::singleton()->lazyPush( $jobs ); } /**