From: Aaron Schulz Date: Wed, 11 Sep 2019 22:07:41 +0000 (-0700) Subject: Cleanup LinksUpdate::invalidateProperties() to use JobQueueGroup::lazyPush() in one... X-Git-Tag: 1.34.0-rc.0~254 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/Kategorie:Great?a=commitdiff_plain;h=dd99fa6e7fec395981ca1146a86a0e9327e712db;p=lhc%2Fweb%2Fwiklou.git Cleanup LinksUpdate::invalidateProperties() to use JobQueueGroup::lazyPush() in one batch Change-Id: I7afaf6e6c0692aad83c017660bb8fdbb8a88597a --- 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 ); } /**