Use lazyPush() instead of push() in a few places for jobs
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 18 May 2015 17:26:53 +0000 (10:26 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 18 May 2015 17:31:24 +0000 (10:31 -0700)
Change-Id: I56661ea29988e4ee217a63f4c3ffcb78333cc454

includes/deferred/HTMLCacheUpdate.php
includes/mail/EmailNotification.php
includes/page/WikiPage.php

index 79a10e6..20e4a4c 100644 (file)
@@ -55,7 +55,7 @@ class HTMLCacheUpdate implements DeferrableUpdate {
 
                $count = $this->mTitle->getBacklinkCache()->getNumLinks( $this->mTable, 100 );
                if ( $count >= 100 ) { // many backlinks
-                       JobQueueGroup::singleton()->push( $job );
+                       JobQueueGroup::singleton()->lazyPush( $job );
                        JobQueueGroup::singleton()->deduplicateRootJob( $job );
                } else { // few backlinks ($count might be off even if 0)
                        $dbw = wfGetDB( DB_MASTER );
index 81c4e38..5ed52c4 100644 (file)
@@ -168,7 +168,7 @@ class EmailNotification {
                                'pageStatus' => $pageStatus
                        );
                        $job = new EnotifNotifyJob( $title, $params );
-                       JobQueueGroup::singleton()->push( $job );
+                       JobQueueGroup::singleton()->lazyPush( $job );
                } else {
                        $this->actuallyNotifyOnPageChange(
                                $editor,
index 914522f..8ef3063 100644 (file)
@@ -2213,7 +2213,7 @@ class WikiPage implements Page, IDBAccessObject {
                                $jobs[] = RecentChangesUpdateJob::newPurgeJob();
                        }
 
-                       JobQueueGroup::singleton()->push( $jobs );
+                       JobQueueGroup::singleton()->lazyPush( $jobs );
                }
 
                if ( !$this->exists() ) {