Merge "Update Maintenance scripts to use $this->requireExtension()"

This commit is contained in:
jenkins-bot 2016-12-06 19:28:16 +00:00 committed by Gerrit Code Review
commit 1bf2f027cd
8 changed files with 17 additions and 0 deletions

View file

@ -13,6 +13,8 @@ class BackfillReadBundles extends Maintenance {
$this->mDescription = "Backfill echo_notification.notification_read_timestamp for bundles";
$this->setBatchSize( 300 );
$this->requireExtension( 'Echo' );
}
public function execute() {

View file

@ -13,6 +13,7 @@ class BackfillUnreadWikis extends Maintenance {
$this->mDescription = "Backfill echo_unread_wikis table";
$this->addOption( 'rebuild', 'Only recompute already-existing rows' );
$this->setBatchSize( 300 );
$this->requireExtension( 'Echo' );
}
public function execute() {

View file

@ -55,6 +55,8 @@ class GenerateSampleNotifications extends Maintenance {
'other',
'Name of another user involved with the notifications',
true, true, 'o' );
$this->requireExtension( 'Echo' );
}
public function execute() {

View file

@ -25,6 +25,8 @@ class ProcessEchoEmailBatch extends Maintenance {
"ignoreConfiguredSchedule",
"Send all pending notifications immediately even if configured to be weekly or daily.",
false, false, "i" );
$this->requireExtension( 'Echo' );
}
public function execute() {

View file

@ -18,6 +18,11 @@ class RemoveInvalidNotification extends Maintenance {
protected $batchSize = 500;
protected $invalidEventType = array( 'article-linked' );
public function __construct() {
$this->mDescription = "Removes invalid notifications from the database.";
$this->requireExtension( 'Echo' );
}
public function execute() {
if ( !$this->invalidEventType ) {
$this->output( "There is nothing to process\n" );

View file

@ -21,6 +21,8 @@ class RemoveOrphanedEvents extends LoggedUpdateMaintenance {
$this->mDescription = "Remove rows from echo_event that don't have corresponding rows in echo_notification";
$this->setBatchSize( 500 );
$this->requireExtension( 'Echo' );
}
public function getUpdateKey() {

View file

@ -12,6 +12,8 @@ class TestDiscussionParser extends Maintenance {
$this->mDescription = "Takes enwiki revision IDs and attempts to identify interested users";
$this->addArg( 'revisions', 'Revision IDs, separated by commas', true /*required*/ );
$this->requireExtension( 'Echo' );
}
public function execute() {

View file

@ -29,6 +29,7 @@ class UpdateEchoSchemaForSuppression extends LoggedUpdateMaintenance {
public function __construct() {
parent::__construct();
$this->setBatchSize( 500 );
$this->requireExtension( 'Echo' );
}
public function getUpdateKey() {