jenkins-bot has submitted this change and it was merged. Change subject: sendConfirmAndMigrateEmail: Add --resume option ......................................................................
sendConfirmAndMigrateEmail: Add --resume option Change-Id: I5cf525f2ef34517bb54bc436928c5ada0765503f --- M maintenance/sendConfirmAndMigrateEmail.php 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/sendConfirmAndMigrateEmail.php b/maintenance/sendConfirmAndMigrateEmail.php index 6d8c3d0..0793911 100644 --- a/maintenance/sendConfirmAndMigrateEmail.php +++ b/maintenance/sendConfirmAndMigrateEmail.php @@ -38,6 +38,11 @@ */ private $dryrun; + /** + * @var string|bool + */ + private $resume; + public function __construct() { parent::__construct(); $this->mDescription = "Resends the 'confirm your email address email' with a link to Special:MergeAccount"; @@ -51,12 +56,14 @@ $this->addOption( 'confirmed', 'Send email to confirmed accounts', false, false ); $this->addOption( 'sleep', 'How long to wait in between emails (default 1 second)', false, true ); $this->addOption( 'dryrun', 'Don\'t actually send any emails', false, false ); + $this->addOption( 'resume', 'Which username to resume after', false, true ); } public function execute() { $this->sendToConfirmed = $this->getOption( 'confirmed', false ); $this->sleep = (int)$this->getOption( 'sleep', 1 ); $this->dryrun = $this->hasOption( 'dryrun'); + $this->resume = $this->getOption( 'resume', true ); // check to see if we are processing a single username if ( $this->getOption( 'username', false ) !== false ) { @@ -77,6 +84,12 @@ } while( $username = fgets( $file ) ) { $username = trim( $username ); // trim the \n + if ( $this->resume !== true ) { + if ( $username === $this->resume ) { + $this->resume = true; + } + continue; + } $this->resendConfirmationEmail( $username ); if ( $this->total % $this->batchSize == 0 ) { -- To view, visit https://gerrit.wikimedia.org/r/183163 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5cf525f2ef34517bb54bc436928c5ada0765503f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: CSteipp <cste...@wikimedia.org> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits