Flag triggerOpportunisticLinksUpdate() behind $wgMiserMode
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 11 Apr 2016 21:49:27 +0000 (14:49 -0700)
committerOri.livneh <ori@wikimedia.org>
Tue, 12 Apr 2016 00:28:16 +0000 (00:28 +0000)
This has caused job flood or DB load problems too often.

Bug: T132318
Change-Id: Ieeaf047e748bdfb980d4d5511c22890bd6f28c67

includes/page/WikiPage.php

index 75f083e..82e66aa 100644 (file)
@@ -3503,6 +3503,8 @@ class WikiPage implements Page, IDBAccessObject {
                        return;
                }
 
+               $config = RequestContext::getMain()->getConfig();
+
                $params = [
                        'isOpportunistic' => true,
                        'rootJobTimestamp' => $parserOutput->getCacheTime()
@@ -3513,7 +3515,7 @@ class WikiPage implements Page, IDBAccessObject {
                        JobQueueGroup::singleton()->lazyPush(
                                RefreshLinksJob::newPrioritized( $this->mTitle, $params )
                        );
-               } elseif ( $parserOutput->hasDynamicContent() ) {
+               } elseif ( !$config->get( 'MiserMode' ) && $parserOutput->hasDynamicContent() ) {
                        // Assume the output contains "dynamic" time/random based magic words.
                        // Only update pages that expired due to dynamic content and NOT due to edits
                        // to referenced templates/files. When the cache expires due to dynamic content,