mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-24 10:49:37 +00:00
Merge "Add progress markers to backfillUnreadWikis.php"
This commit is contained in:
commit
943b073f58
|
@ -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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue