r46757 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46756‎ | r46757 | r46758 >
Date:07:20, 3 February 2009
Author:aaron
Status:deferred
Tags:
Comment:
Take on cache query updates to updateSpecialPages
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/maintenance/updateQueryCache.inc (modified) (history)
  • /trunk/extensions/FlaggedRevs/maintenance/updateStats.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -528,7 +528,17 @@
529529 $wgAjaxExportList[] = 'ReaderFeedback::AjaxReview';
530530 $wgAjaxExportList[] = 'RevisionReview::AjaxReview';
531531
 532+# Cache update
 533+$wgSpecialPageCacheUpdates[] = 'efFlaggedRevsUnreviewedPagesUpdate';
532534
 535+function efFlaggedRevsUnreviewedPagesUpdate() {
 536+ $base = dirname(__FILE__);
 537+ require_once( "$base/maintenance/updateQueryCache.inc" );
 538+ update_flaggedrevs_querycache();
 539+ require_once( "$base/maintenance/updateStats.inc" );
 540+ update_flaggedrevs_stats();
 541+}
 542+
533543 # B/C ...
534544 $wgLogActions['rights/erevoke'] = 'rights-editor-revoke';
535545
Index: trunk/extensions/FlaggedRevs/maintenance/updateQueryCache.inc
@@ -10,6 +10,7 @@
1111 if( empty($wgFlaggedRevsNamespaces) ) {
1212 return;
1313 }
 14+ print( "UnreviewedPages..." );
1415 $dbr = wfGetDB( DB_SLAVE );
1516 $querycache = $dbr->tableName( 'querycache' );
1617 # Find pages that should be listed...
@@ -51,5 +52,5 @@
5253 $dbw->delete( 'querycache_info', array( 'qci_type' => 'fr_unreviewedpages' ), __METHOD__ );
5354 $dbw->insert( 'querycache_info', array( 'qci_type' => 'fr_unreviewedpages',
5455 'qci_timestamp' => $dbw->timestamp() ), __METHOD__ );
55 - print( "Done updating unreviewed pages list!\n" );
 56+ print( "done!\n" );
5657 }
Index: trunk/extensions/FlaggedRevs/maintenance/updateStats.inc
@@ -17,7 +17,7 @@
1818 $ns = $dbr->makeList( $wgFlaggedRevsNamespaces );
1919 if( empty($ns) ) return; // no SQL errors please :)
2020
21 - print( "Updating flaggedrevs stats...\n" );
 21+ print( "ValidationStatistics..." );
2222
2323 $ns_total = array();
2424 $ns_reviewed = array();
@@ -186,7 +186,7 @@
187187 $key = wfMemcKey( 'flaggedrevs', 'statsUpdated' );
188188 $dbCache->set( $key, '1', $wgFlaggedRevsStatsAge );
189189 $dbCache->delete( $keySQL );
190 - print( "...done updating!\n" );
 190+ print( "done updating!\n" );
191191 }
192192
193193 function createFlaggedRevsStatsTable( $dbw, $flaggedrevs_stats ) {

Status & tagging log