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

Change subject: core:Replace usage of wfWaitForSlaves.
......................................................................

core:Replace usage of wfWaitForSlaves.

Replaced 10 "wfWaitForSlaves" in these php files which has been
deprecated since 1.27, I use a new version instead of it

Change-Id: I8bfb7428593a8315b3ad1fd5f7601a2005a05583
---
M maintenance/update.php
M maintenance/updateCollation.php
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/394834/1

diff --git a/maintenance/update.php b/maintenance/update.php
index 529c069..8bd2abd 100755
--- a/maintenance/update.php
+++ b/maintenance/update.php
@@ -120,7 +120,7 @@
 
                $this->output( "MediaWiki {$wgVersion} Updater\n\n" );
 
-               wfWaitForSlaves();
+               wfGetLBFactory()->waitForReplication();
 
                if ( !$this->hasOption( 'skip-compat-checks' ) ) {
                        $this->compatChecks();
diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php
index 84fc2d2..760b5a8 100644
--- a/maintenance/updateCollation.php
+++ b/maintenance/updateCollation.php
@@ -139,7 +139,7 @@
                        } else {
                                $this->output( "Fixing collation for $count 
rows.\n" );
                        }
-                       wfWaitForSlaves();
+                       wfGetLBFactory()->waitForReplication();
                }
                $count = 0;
                $batchCount = 0;
@@ -227,7 +227,7 @@
 
                        if ( !$dryRun && ++$batchCount % self::SYNC_INTERVAL == 
0 ) {
                                $this->output( "Waiting for replica DBs ... " );
-                               wfWaitForSlaves();
+                               wfGetLBFactory()->waitForReplication();
                                $this->output( "done\n" );
                        }
                } while ( $res->numRows() == self::BATCH_SIZE );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bfb7428593a8315b3ad1fd5f7601a2005a05583
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