Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/196501
Change subject: Add setBatchSize() call for refreshGlobalimagelinks.php ...................................................................... Add setBatchSize() call for refreshGlobalimagelinks.php Bug: T65594 Change-Id: I4b15b5dfdc61d71d1dc8b37acedb271969aa1a18 --- M refreshGlobalimagelinks.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUsage refs/changes/01/196501/1 diff --git a/refreshGlobalimagelinks.php b/refreshGlobalimagelinks.php index 345e028..1e6aec9 100644 --- a/refreshGlobalimagelinks.php +++ b/refreshGlobalimagelinks.php @@ -17,6 +17,7 @@ $this->addOption( 'start-page', 'page_id of the page to start with' ); $this->addOption( 'start-image', 'il_to of the image to start with' ); $this->addOption( 'pages', 'CSV of (existing,nonexisting)', true, true ); + $this->setBatchSize( 500 ); } public function execute() { @@ -32,7 +33,6 @@ if ( in_array( 'existing', $pages ) ) { $lastPageId = intval( $this->getOption( 'start-page', 0 ) ); $lastIlTo = $this->getOption( 'start-image' ); - $limit = 500; do { $this->output( "Querying links after (page_id, il_to) = ($lastPageId, $lastIlTo)\n" ); @@ -50,7 +50,7 @@ __METHOD__, array( 'ORDER BY' => $dbr->implicitOrderBy() ? 'page_id' : 'page_id, il_to', - 'LIMIT' => $limit + 'LIMIT' => $this->mBatchSize, ), array( # LEFT JOIN imagelinks since we need to delete usage -- To view, visit https://gerrit.wikimedia.org/r/196501 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b15b5dfdc61d71d1dc8b37acedb271969aa1a18 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalUsage Gerrit-Branch: master Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits