jenkins-bot has submitted this change and it was merged.

Change subject: Reduced the rate of RecentChangesUpdateJob insertion
......................................................................


Reduced the rate of RecentChangesUpdateJob insertion

Change-Id: Ic7db658f45365ca8ddf7f9dc807a30bc707fe517
---
M includes/page/WikiPage.php
1 file changed, 8 insertions(+), 6 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 7b33b02..2098bec 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -2206,12 +2206,14 @@
                Hooks::run( 'ArticleEditUpdates', array( &$this, &$editInfo, 
$options['changed'] ) );
 
                if ( Hooks::run( 'ArticleEditUpdatesDeleteFromRecentchanges', 
array( &$this ) ) ) {
-                       JobQueueGroup::singleton()->push( array(
-                               // Flush old entries from the `recentchanges` 
table
-                               RecentChangesUpdateJob::newPurgeJob(),
-                               // Update the cached list of active users
-                               RecentChangesUpdateJob::newCacheUpdateJob()
-                       ) );
+                       // Update the cached list of active users
+                       $jobs = array( 
RecentChangesUpdateJob::newCacheUpdateJob() );
+                       // Flush old entries from the `recentchanges` table
+                       if ( mt_rand( 0, 9 ) == 0 ) {
+                               $jobs[] = RecentChangesUpdateJob::newPurgeJob();
+                       }
+
+                       JobQueueGroup::singleton()->push( $jobs );
                }
 
                if ( !$this->exists() ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/211308
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7db658f45365ca8ddf7f9dc807a30bc707fe517
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Gilles <gdu...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to