Lengyue has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394753 )

Change subject:  Changes to be committed:       modified:   
maintenance/refreshLinks.php
......................................................................

Changes to be committed:
        modified:   maintenance/refreshLinks.php

Change-Id: I4e2ca6b14f4826f484c7da8ea746738026e91bb1
---
M maintenance/refreshLinks.php
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/394753/1

diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index 4fab146..5035389 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -139,7 +139,7 @@
                        foreach ( $res as $row ) {
                                if ( !( ++$i % self::REPORTING_INTERVAL ) ) {
                                        $this->output( "$i\n" );
-                                       wfWaitForSlaves();
+                                       wfGetLBFactory()->waitForReplication();
                                }
                                $this->fixRedirect( $row->page_id );
                        }
@@ -160,7 +160,7 @@
                        foreach ( $res as $row ) {
                                if ( !( ++$i % self::REPORTING_INTERVAL ) ) {
                                        $this->output( "$i\n" );
-                                       wfWaitForSlaves();
+                                       wfGetLBFactory()->waitForReplication();
                                }
                                if ( $redirectsOnly ) {
                                        $this->fixRedirect( $row->page_id );
@@ -180,7 +180,7 @@
                        for ( $id = $start; $id <= $end; $id++ ) {
                                if ( !( $id % self::REPORTING_INTERVAL ) ) {
                                        $this->output( "$id\n" );
-                                       wfWaitForSlaves();
+                                       wfGetLBFactory()->waitForReplication();
                                }
                                $this->fixRedirect( $id );
                        }
@@ -192,7 +192,7 @@
                                for ( $id = $start; $id <= $end; $id++ ) {
                                        if ( !( $id % self::REPORTING_INTERVAL 
) ) {
                                                $this->output( "$id\n" );
-                                               wfWaitForSlaves();
+                                               
wfGetLBFactory()->waitForReplication();
                                        }
                                        self::fixLinksFromArticle( $id, 
$this->namespace );
                                }
@@ -294,7 +294,7 @@
        private function deleteLinksFromNonexistent( $start = null, $end = 
null, $batchSize = 100,
                $chunkSize = 100000
        ) {
-               wfWaitForSlaves();
+               wfGetLBFactory()->waitForReplication();
                $this->output( "Deleting illegal entries from the links 
tables...\n" );
                $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] );
                do {
@@ -374,7 +374,7 @@
                                        $dbw->delete( $table, [ $field => $ids 
], __METHOD__ );
                                        $this->output( ", $counter" );
                                        $tableStart = $ids[$numIds - 1] + 1;
-                                       wfWaitForSlaves();
+                                       wfGetLBFactory()->waitForReplication();
                                }
 
                        } while ( $numIds >= $batchSize && ( $end === null || 
$tableStart <= $end ) );
@@ -463,7 +463,7 @@
                        foreach ( $res as $row ) {
                                if ( !( ++$i % self::REPORTING_INTERVAL ) ) {
                                        $this->output( "$i\n" );
-                                       wfWaitForSlaves();
+                                       wfGetLBFactory()->waitForReplication();
                                }
                                $lastId = $row->page_id;
                                $timestamp = $row->cl_timestamp;

-- 
To view, visit https://gerrit.wikimedia.org/r/394753
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e2ca6b14f4826f484c7da8ea746738026e91bb1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Lengyue <736917...@qq.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to