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 (cherry picked from commit 93d3373edca42d2e954367d2a4a916a11dbf4b10) --- M includes/page/WikiPage.php 1 file changed, 8 insertions(+), 6 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 2027102..68ae096 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/211751 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: wmf/1.26wmf5 Gerrit-Owner: Aaron Schulz <asch...@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