From: Aaron Schulz Date: Tue, 20 Oct 2015 20:51:59 +0000 (-0700) Subject: Make triggerOpportunisticLinksUpdate() directly use RefreshLinks X-Git-Tag: 1.31.0-rc.0~9331 X-Git-Url: http://git.cyclocoop.org/%27%20.%20url_absolue%28%24favicon%29%20.%20?a=commitdiff_plain;h=7a4348640e09bea835620aceab88204c81e81012;p=lhc%2Fweb%2Fwiklou.git Make triggerOpportunisticLinksUpdate() directly use RefreshLinks This makes the jobs *actually* end up in the 'refreshLinksPrioritized' queue rather than 'refreshLinks'. These jobs can run fast in a higher priority queue since the output is already cached (much of the point of 'prioritize'). They won't if they get stuck behind regular 'refreshLinks'. This also avoids the indirection of an intermediate job. The use of lazyPush() is already enough to prevent the user from experiencing cross-DC RTT overhead. Change-Id: I5d0440588db09c299cd70191e5624ffc7ebf04c0 --- diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 29038c7e07..8acb3e3101 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3489,11 +3489,7 @@ class WikiPage implements Page, IDBAccessObject { if ( $this->getLinksTimestamp() < $this->getTouched() ) { $params['isOpportunistic'] = true; $params['rootJobTimestamp'] = $parserOutput->getCacheTime(); - - JobQueueGroup::singleton()->lazyPush( EnqueueJob::newFromLocalJobs( - new JobSpecification( 'refreshLinks', $params, - array( 'removeDuplicates' => true ), $this->mTitle ) - ) ); + JobQueueGroup::singleton()->lazyPush( new RefreshLinksJob( $this->mTitle, $params ) ); } }