From dd99fa6e7fec395981ca1146a86a0e9327e712db Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 11 Sep 2019 15:07:41 -0700 Subject: [PATCH] Cleanup LinksUpdate::invalidateProperties() to use JobQueueGroup::lazyPush() in one batch Change-Id: I7afaf6e6c0692aad83c017660bb8fdbb8a88597a --- includes/deferred/LinksUpdate.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index 8345ee6575..c4e83413de 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -1066,6 +1066,7 @@ class LinksUpdate extends DataUpdate { private function invalidateProperties( $changed ) { global $wgPagePropLinkInvalidations; + $jobs = []; foreach ( $changed as $name => $value ) { if ( isset( $wgPagePropLinkInvalidations[$name] ) ) { $inv = $wgPagePropLinkInvalidations[$name]; @@ -1073,12 +1074,16 @@ class LinksUpdate extends DataUpdate { $inv = [ $inv ]; } foreach ( $inv as $table ) { - DeferredUpdates::addUpdate( - new HTMLCacheUpdate( $this->mTitle, $table, 'page-props' ) + $jobs[] = HTMLCacheUpdateJob::newForBacklinks( + $this->mTitle, + $table, + [ 'causeAction' => 'page-props' ] ); } } } + + JobQueueGroup::singleton()->lazyPush( $jobs ); } /** -- 2.20.1