Ryan10145 has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/394729 )
Change subject: Removed instances of deprecated wfWaitForSlaves
......................................................................
Removed instances of deprecated wfWaitForSlaves
Change-Id: Id0edcc95dac26263c48a18534ddfc021ce7fb67d
---
M maintenance/cleanupEmptyCategories.php
M maintenance/cleanupInvalidDbKeys.php
M maintenance/cleanupUploadStash.php
M maintenance/cleanupUsersWithNoId.php
M maintenance/convertUserOptions.php
M maintenance/deleteBatch.php
M maintenance/deleteDefaultMessages.php
M maintenance/deleteEqualMessages.php
M maintenance/deleteSelfExternals.php
9 files changed, 13 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/29/394729/1
diff --git a/maintenance/cleanupEmptyCategories.php
b/maintenance/cleanupEmptyCategories.php
index 2d22704..4a052a2 100644
--- a/maintenance/cleanupEmptyCategories.php
+++ b/maintenance/cleanupEmptyCategories.php
@@ -134,7 +134,7 @@
}
$this->output( "--mode=$mode --begin=$name\n" );
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
usleep( $throttle * 1000 );
}
@@ -188,7 +188,7 @@
$this->output( "--mode=remove --begin=$name\n"
);
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
usleep( $throttle * 1000 );
}
}
diff --git a/maintenance/cleanupInvalidDbKeys.php
b/maintenance/cleanupInvalidDbKeys.php
index 569fd2b..47e7550 100644
--- a/maintenance/cleanupInvalidDbKeys.php
+++ b/maintenance/cleanupInvalidDbKeys.php
@@ -235,7 +235,7 @@
__METHOD__ );
$affectedRowCount +=
$dbw->affectedRows();
}
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
$this->outputStatus( "Updated $affectedRowCount
rows on $table.\n" );
break;
@@ -248,7 +248,7 @@
// recently, so we can just remove these rows.
$this->outputStatus( "Deleting invalid $table
rows...\n" );
$dbw->delete( $table, [ $idField => $ids ],
__METHOD__ );
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
$this->outputStatus( 'Deleted ' .
$dbw->affectedRows() . " rows from $table.\n" );
break;
@@ -264,7 +264,7 @@
__METHOD__ );
$affectedRowCount +=
$dbw->affectedRows();
}
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
$this->outputStatus( "Deleted $affectedRowCount
rows from $table.\n" );
break;
@@ -286,7 +286,7 @@
__METHOD__ );
}
}
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
$this->outputStatus( "Link update jobs have
been added to the job queue.\n" );
break;
}
diff --git a/maintenance/cleanupUploadStash.php
b/maintenance/cleanupUploadStash.php
index aeaf150..37ec26a 100644
--- a/maintenance/cleanupUploadStash.php
+++ b/maintenance/cleanupUploadStash.php
@@ -87,7 +87,7 @@
$this->output( "Failed removing stashed
upload with key: $key ($type)\n" );
}
if ( $i % 100 == 0 ) {
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
$this->output( "$i\n" );
}
}
diff --git a/maintenance/cleanupUsersWithNoId.php
b/maintenance/cleanupUsersWithNoId.php
index 74167d1..9b6bf82 100644
--- a/maintenance/cleanupUsersWithNoId.php
+++ b/maintenance/cleanupUsersWithNoId.php
@@ -199,7 +199,7 @@
list( $next, $display ) = $this->makeNextCond( $dbw,
$orderby, $row );
$this->output( "... $display\n" );
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
}
$this->output(
diff --git a/maintenance/convertUserOptions.php
b/maintenance/convertUserOptions.php
index 501f045..c42440b 100644
--- a/maintenance/convertUserOptions.php
+++ b/maintenance/convertUserOptions.php
@@ -66,7 +66,7 @@
);
$id = $this->convertOptionBatch( $res, $dbw );
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
if ( $id ) {
$this->output( "--Converted to ID $id\n" );
diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php
index eceadc1..0e85060 100644
--- a/maintenance/deleteBatch.php
+++ b/maintenance/deleteBatch.php
@@ -119,7 +119,7 @@
if ( $interval ) {
sleep( $interval );
}
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
}
}
}
diff --git a/maintenance/deleteDefaultMessages.php
b/maintenance/deleteDefaultMessages.php
index 417aa03..e0f4983 100644
--- a/maintenance/deleteDefaultMessages.php
+++ b/maintenance/deleteDefaultMessages.php
@@ -82,7 +82,7 @@
$dbw = $this->getDB( DB_MASTER );
foreach ( $res as $row ) {
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
$dbw->ping();
$title = Title::makeTitle( $row->page_namespace,
$row->page_title );
$page = WikiPage::factory( $title );
diff --git a/maintenance/deleteEqualMessages.php
b/maintenance/deleteEqualMessages.php
index 2a1fe22..6adef38 100644
--- a/maintenance/deleteEqualMessages.php
+++ b/maintenance/deleteEqualMessages.php
@@ -176,7 +176,7 @@
$this->output( "\n...deleting equal messages (this may take a
long time!)..." );
$dbw = $this->getDB( DB_MASTER );
foreach ( $messageInfo['results'] as $result ) {
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
$dbw->ping();
$title = Title::makeTitle( NS_MEDIAWIKI,
$result['title'] );
$this->output( "\n* [[$title]]" );
diff --git a/maintenance/deleteSelfExternals.php
b/maintenance/deleteSelfExternals.php
index ab25784..7523889 100644
--- a/maintenance/deleteSelfExternals.php
+++ b/maintenance/deleteSelfExternals.php
@@ -41,7 +41,7 @@
$this->output( "Deleting self externals from $wgServer\n" );
$db = $this->getDB( DB_MASTER );
while ( 1 ) {
- wfWaitForSlaves();
+ wfGetLBFactory()->waitForReplication();
$this->commitTransaction( $db, __METHOD__ );
$q = $db->limitResult( "DELETE /* deleteSelfExternals
*/ FROM externallinks WHERE el_to"
. $db->buildLike( $wgServer . '/',
$db->anyString() ), $this->getBatchSize() );
--
To view, visit https://gerrit.wikimedia.org/r/394729
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0edcc95dac26263c48a18534ddfc021ce7fb67d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ryan10145 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits