Push enqueue-on-view jobs to the faster "local" queue
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 6 Mar 2015 21:50:17 +0000 (13:50 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 6 Mar 2015 21:50:17 +0000 (13:50 -0800)
* This only matters for multi-DC setups, otherwise everything is local anyway

Bug: T91819
Change-Id: I0756b59ae1ba27a5d24cf7baef6d068b748e6e30

includes/DefaultSettings.php
includes/page/WikiPage.php

index bafec8d..8080774 100644 (file)
@@ -6425,7 +6425,7 @@ $wgJobClasses = array(
        'ThumbnailRender' => 'ThumbnailRenderJob',
        'recentChangesUpdate' => 'RecentChangesUpdateJob',
        'refreshLinksPrioritized' => 'RefreshLinksJob', // for cascading protection
-       'enqueue' => 'EnqueueJob',
+       'enqueue' => 'EnqueueJob', // local queue for multi-DC setups
        'null' => 'NullJob'
 );
 
index fe61f6f..b1e4f2d 100644 (file)
@@ -3402,7 +3402,9 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Check if the last link refresh was before page_touched
                if ( $this->getLinksTimestamp() < $this->getTouched() ) {
-                       JobQueueGroup::singleton()->push( new RefreshLinksJob( $this->mTitle, $params ) );
+                       JobQueueGroup::singleton()->push( EnqueueJob::newFromLocalJobs(
+                               new JobSpecification( 'refreshLinks', $params, array(), $this->mTitle )
+                       ) );
                        return true;
                }