mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Merge "Update Maintenance scripts to use $this->requireExtension()"
This commit is contained in:
commit
1bf2f027cd
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -29,6 +29,7 @@ class UpdateEchoSchemaForSuppression extends LoggedUpdateMaintenance {
|
|||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->setBatchSize( 500 );
|
||||
$this->requireExtension( 'Echo' );
|
||||
}
|
||||
|
||||
public function getUpdateKey() {
|
||||
|
|
Loading…
Reference in a new issue