From 9f7fba935f796e3d673092db6ecb82d232985871 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 18 Jan 2016 19:14:34 -0800 Subject: [PATCH] Add progress markers to backfillUnreadWikis.php Change-Id: I43fe3d9998b5ebf3ddbec9ced0394c70293b6f18 --- maintenance/backfillUnreadWikis.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maintenance/backfillUnreadWikis.php b/maintenance/backfillUnreadWikis.php index 3392c88e3..44b40684d 100644 --- a/maintenance/backfillUnreadWikis.php +++ b/maintenance/backfillUnreadWikis.php @@ -22,6 +22,7 @@ class BackfillUnreadWikis extends Maintenance { $iterator = new BatchRowIterator( $dbr, 'user', 'user_id', $this->mBatchSize ); $iterator->setFetchColumns( User::selectFields() ); + $processed = 0; foreach ( $iterator as $batch ) { foreach ( $batch as $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 ); } }