Merge "Add progress markers to backfillUnreadWikis.php"

This commit is contained in:
jenkins-bot 2016-01-19 03:19:27 +00:00 committed by Gerrit Code Review
commit 943b073f58

View file

@ -22,6 +22,7 @@ class BackfillUnreadWikis extends Maintenance {
$iterator = new BatchRowIterator( $dbr, 'user', 'user_id', $this->mBatchSize ); $iterator = new BatchRowIterator( $dbr, 'user', 'user_id', $this->mBatchSize );
$iterator->setFetchColumns( User::selectFields() ); $iterator->setFetchColumns( User::selectFields() );
$processed = 0;
foreach ( $iterator as $batch ) { foreach ( $iterator as $batch ) {
foreach ( $batch as $row ) { foreach ( $batch as $row ) {
$user = User::newFromRow( $row ); $user = User::newFromRow( $row );
@ -39,6 +40,8 @@ class BackfillUnreadWikis extends Maintenance {
} }
} }
$processed += count( $batch );
$this->output( "Updated $processed users.\n" );
wfWaitForSlaves( false, false, $wgEchoSharedTrackingCluster ); wfWaitForSlaves( false, false, $wgEchoSharedTrackingCluster );
} }
} }